📌  相关文章
📜  如何在 app.blade 中传递值 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:40.591000             🧑  作者: Mango

代码示例1
//create a service provider
php artisan make:provider ComposerServiceProvider
  
//register the app service provider in providers array of config/app.php
App\Providers\ComposerServiceProvider::class,

//pass the data you want to share in views 
with('data', $data); // 'data' is value to be used in views 'data' = $data
        });
    }

    public function register()
    {
        //
    }
}