【发布时间】:2017-02-22 14:43:03
【问题描述】:
我有两个几乎相同的模板。这是邮件模板,但它应该在两个不同的地方。所以他们扩展了两个不同的模板,但是这个和节名是唯一的区别。
示例如下:
@extends('layout.client')
//sections etc
@section('content')
//content here
@endsection
//other sections etc
这是第二个模板:
@extends('layout.company')
//sections etc
@section('contentinner')
//content here
@endsection
//other sections etc
其他部分大多是导入库以使内容正常工作。
我应该如何处理才能不重复代码?
【问题讨论】: