Saturday, May 5, 2018

best way to set params into blade - development

best way to set params into blade

How to set params into laravel view with spark?

Without spark I do that just through routes, but Spark have one route for settings and doesn’t send requests after navigation

account.blade.php:

 <account inline-template>
  <div>
    Here I want to use data from database
  </div>
 </account> 

setting.blade.php (only my changes)

 <div role="tabcard" class="tab-pane" id="account">
       @include('spark::settings.account')
 </div>

account.js:

Vue.component('account', {
  mounted(){
      debugger
  }
});

and I found setting router:

 $router->get('/settings', 'SettingsDashboardController@show')->name('settings');


public function show()
{
    return view('spark::settings');
}



from Laravel Questions and Answers https://laravelquestions.com/php/best-way-to-set-params-into-blade/
via Lzo Media

No comments:

Post a Comment