user
02/23/2022, 10:52 PMpboivin
02/23/2022, 10:53 PMurl computed property in the JSON that is passed to your Inertia frontend.user
02/23/2022, 10:53 PMuser
02/23/2022, 10:53 PMpboivin
02/23/2022, 10:54 PMpublic function getUrlAttribute()
{
return route('slug', ['slug' => $this->slug]);
}user
02/23/2022, 10:57 PMphp
public function allPages()
{
return $this->model
->getUrlAttribute()
->get();
}
i get this error Missing required parameter for [Route: slug] [URI: pages/{slug}] [Missing parameter: slug].pboivin
02/23/2022, 11:03 PMreturn $this->model->get() like before.pboivin
02/23/2022, 11:04 PMurl key in your JSON output.user
02/23/2022, 11:06 PMpboivin
02/23/2022, 11:06 PMpboivin
02/23/2022, 11:07 PMuser
02/23/2022, 11:07 PMpboivin
02/23/2022, 11:07 PMpboivin
02/23/2022, 11:08 PMpboivin
02/23/2022, 11:08 PMclass Page extends Model implements Sortable
{
protected $appends = ['url'];
//...
}user
02/23/2022, 11:08 PMuser
02/23/2022, 11:09 PMpboivin
02/23/2022, 11:09 PMuser
02/23/2022, 11:11 PMpboivin
02/23/2022, 11:12 PMpboivin
02/23/2022, 11:16 PMuser
02/23/2022, 11:42 PMamargoCactus
02/24/2022, 4:43 PMifox
02/24/2022, 4:44 PMamargoCactus
02/24/2022, 5:28 PMamargoCactus
02/24/2022, 5:29 PMamargoCactus
02/24/2022, 5:34 PMtext_grid is the block and text_grid_item are the repeaters
if content is written to resources/views/site/blocks/text_grid_item.blade.php it appears in all the blocks, i don't understand whyifox
02/24/2022, 5:35 PMamargoCactus
02/24/2022, 5:35 PMresources/views/site/blocks/text_grid_item.blade.php content is
<div class="container">
<div class="row">
@foreach($block->childs as $repeater)
<div class="col">
{!! $repeater->content['text_grid_item'] !!}
</div>
@endforeach
</div>
</div>ifox
02/24/2022, 5:35 PM