php - 如何解决这个 laravel 布局问题?
问题描述
我的错误:我很长时间都面临这个问题,并在 stackoverflow 中找到了一个解决方案,但它不起作用。我需要使用 laravel、php 7+ 和 mysql 的解决方案。
它显示以下错误:ErrorException Trying to get property 'app_layout' of non-object
错误页面包含以下代码,我尝试了堆栈溢出中的所有解决方案,但没有我们。我想在这里显示我的布局而没有任何错误。
脚本中的错误\app\Http\Controllers\MainBaseController.php:26
code on the page is : error line highlighted in BOLD below
use Illuminate\Support\Facades\Schema;
use Froiden\Envato\Traits\AppBoot;
class MainBaseController extends Controller
{
public function __construct()
{
parent::__construct();
// Settings
$this->settings = Setting::first();
$this->year = Common::year();
$this->bootstrapModalRight = true;
$this->bootstrapModalSize = 'md';
**$this->siteLayout = $this->settings->app_layout; // top, sidebar**
$this->forbiddenErrorView = 'errors.403';
$this->showFooter = true;
$this->rtl = $this->settings->rtl;
// Status
$this->statusArray = [
'enabled' => __('app.enabled'),
'disabled' => __('app.disabled')
];
// Setting assets path
$allPaths = Common::getFolderPath();
foreach($allPaths as $allPathKey => $allPath)
{
$this->{$allPathKey} = $allPath;
我将错误部分放在上面的代码中,如果您需要我将提供的任何其他部分
解决方案
推荐阅读
- javascript - 我需要获取 div 下的 div 并将它们拖放到另一个 div
- python - 在字符串之前创建带有“b”前缀的字节时,python使用什么编码?
- c++ - 可变参数模板的类型推导
- javascript - 在对象上动态调用方法名
- sql - 如何连接多个表以获取收入超过经理的员工姓名?
- java - @Sql 用于在 Spring 中填充数据库的测试
- python-3.x - Server.sendmail() 将我的收件人设置为密件抄送
- flutter - 可以使用 flutter_beacon 包在 Flutter 中制作 Social Distancing 应用程序吗?
- dart - 如何在 dart 中通过 CookieManager 使用 Dio 添加默认 cookie
- flutter - 仅着色 TextForm 文本的一部分