2
I am developing a CMS system, where I choose the component that the user that on your site page.
In this line of code I load the data of the components, this data is coming from a file components.yaml
that brings this configuration.
<div class="list-group">
@foreach( $components as $component)
<a href="" class="list-group-item list-group-item-action btn btn-outline-primary">{{ $component->title }} : {{ $component->component }}</a>
@endforeach
</div>
At the moment I want to click on a comoponete of that I generate that route: website/{website}/pages/{page}/components/create?componente=page-simpleheader
In case I wanted to know how I pass this parameter in the routes of the Laravel? ?componente=page-simpleheader
, on this route I will load the view with the form to register this component on the page.
Routes
Route::group([
'as' => 'pages.',
'prefix' => 'pages/{page}',
'middleware' => 'managercontext:website_page'
], function() {
Route::resource('components', 'Website\PageContentComponentsController', [
'only' => ['show', 'create', 'store', 'edit', 'update', 'destroy']
]);
});