pboivin
10/25/2021, 6:01 PMtwill-metadata package. That would be awesome.pboivin
10/25/2021, 6:03 PM`Sebastlan
10/25/2021, 6:04 PMifox
10/25/2021, 6:16 PM`Sebastlan
10/25/2021, 6:18 PMuser
10/25/2021, 10:02 PM$model->medias but just couldn't get the urlifox
10/25/2021, 10:05 PMuser
10/25/2021, 10:06 PMDefenestrația
10/25/2021, 10:09 PMifox
10/25/2021, 10:11 PM$model->medias->map(function ($media) {
return ImageService::getUrl($media->uuid, [<params>]);
});ifox
10/25/2021, 10:14 PMvalhalla14
10/26/2021, 3:02 AMafatmustafa
10/26/2021, 6:40 AMprotected function formData($request): array
{
return [
'editor' => false,
];
}
this in your controller.`Sebastlan
10/26/2021, 8:08 AMifox
10/26/2021, 8:11 AM`Sebastlan
10/26/2021, 8:58 AMifox
10/26/2021, 8:58 AM`Sebastlan
10/26/2021, 8:58 AMifox
10/26/2021, 8:58 AMifox
10/26/2021, 8:59 AM`Sebastlan
10/26/2021, 8:59 AMifox
10/26/2021, 9:00 AM`Sebastlan
10/26/2021, 9:03 AM$posts = Post::whereHas('category', function (Builder $query) use ($category) {
$query->where('post_category_id', $category->id);
})->published()->visible()->paginate(15);
$categories = PostCategory::whereHas('posts', function ($query) {
$query->published()->visible();
})->withCount(['posts' => function ($query) {
$query->published()->visible();
}])->published()->get() ?? [];
@formField('select',[
'name' => 'post_category_id',
'label' => 'Wybierz kategorie',
'options' => $categories,
'required' => true
])
// Data for the form view
protected function formData($request)
{
return [
'categories' => app()->make(PostCategoryRepository::class)->listAll(),
'metadata_card_type_options' => config('metadata.card_type_options'),
'metadata_og_type_options' => config('metadata.opengraph_type_options'),
];
}ifox
10/26/2021, 9:10 AMRayderxx
10/26/2021, 9:10 AMifox
10/26/2021, 9:10 AMpost_category_id in your Post model fillables?`Sebastlan
10/26/2021, 9:12 AMifox
10/26/2021, 9:13 AMRayderxx
10/26/2021, 9:13 AM`Sebastlan
10/26/2021, 9:14 AM