首页 > 解决方案 > 如何解决这个 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;

我将错误部分放在上面的代码中,如果您需要我将提供的任何其他部分

标签: phpmysqllaravel

解决方案


推荐阅读