void
07/06/2021, 3:39 PMphp
public function show($slug)
{
$car = $this->carRepository->forSlug($slug);
void
07/06/2021, 3:39 PMifox
07/06/2021, 3:40 PMvoid
07/06/2021, 3:40 PMpboivin
07/06/2021, 3:40 PM$project = app(ProjectRepository::class)->forSlug($slug);
void
07/06/2021, 3:40 PMuser
07/06/2021, 3:41 PMuser
07/06/2021, 3:42 PMuser
07/07/2021, 8:17 AMmulti_select
and the external sectors table? Is the sectors
table mandatory? I mean, is that name just a name for my table which will hold data OR is the sectors
table something that twill convention requires? I mean, is it required in the same sense as the medias
and files
tables?ifox
07/07/2021, 8:19 AMuser
07/07/2021, 8:19 AMifox
07/07/2021, 8:19 AMuser
07/07/2021, 8:20 AMuser
07/07/2021, 8:44 AMimage()
method, what else could be the cause of having a data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
output instead of an actual path?user
07/07/2021, 8:44 AM+mediasParams: array:3 [▼
"carousel_image" => array:3 [▶]
"seo_image" => array:3 [▶]
"image" => array:3 [▼
"desktop" => array:1 [▼
0 => array:2 [▼
"name" => "desktop"
"ratio" => 0
]
]
"mobile" => array:1 [▶]
"flexible" => array:3 [▶]
]
]
user
07/07/2021, 8:44 AM$product->image('image', 'desktop')
ifox
07/07/2021, 8:45 AMuser
07/07/2021, 8:45 AMifox
07/07/2021, 8:47 AM@formField('medias', ['name' => 'image', ...)
in your form?user
07/07/2021, 8:48 AM@formField('medias', [
'name' => 'image',
'label' => 'Product Image',
'max' => 1,
])
ifox
07/07/2021, 8:48 AMimage
role in the block editor configuration with different crop names, you might end up with no desktop
crop.ifox
07/07/2021, 8:49 AMuser
07/07/2021, 8:50 AMtwill.php
and inside blocks_editor
'crops' => [
'cover' => [
'desktop' => [
[
'name' => 'desktop',
'ratio' => 0,
'minValues' => [
'width' => 100,
'height' => 100,
],
],
],
'tablet' => [
[
'name' => 'tablet',
'ratio' => 0,
'minValues' => [
'width' => 100,
'height' => 100,
],
],
],
'mobile' => [
[
'name' => 'mobile',
'ratio' => 0,
'minValues' => [
'width' => 100,
'height' => 100,
],
],
],
],
'image' => [
'desktop' => [
[
'name' => 'desktop',
'ratio' => 0,
],
],
'mobile' => [
[
'name' => 'mobile',
'ratio' => 1,
],
],
'flexible' => [
[
'name' => 'free',
'ratio' => 0,
],
[
'name' => 'landscape',
'ratio' => 0,
],
[
'name' => 'portrait',
'ratio' => 0,
],
],
],
ifox
07/07/2021, 8:52 AMifox
07/07/2021, 8:52 AMuser
07/07/2021, 8:54 AMifox
07/07/2021, 8:58 AMuser
07/07/2021, 9:02 AM"pivot" => Illuminate\Database\Eloquent\Relations\MorphPivot {#2587 ▼
#morphType: "mediable_type"
#morphClass: "App\Models\Product"
+incrementing: false
#guarded: []
#connection: "mysql"
#table: "mediables"
#primaryKey: "id"
#keyType: "int"
#with: []
#withCount: []
#perPage: 15
+exists: true
+wasRecentlyCreated: false
#attributes: array:15 [▶]
#original: array:15 [▶]
#changes: []
#casts: []
#classCastCache: []
#dates: []
#dateFormat: null
#appends: []
#dispatchesEvents: []
#observables: []
#relations: []
#touches: []
+timestamps: true
#hidden: []
#visible: []
#fillable: []
+pivotParent: App\Models\Product {#2443 ▶}
#foreignKey: "mediable_id"
#relatedKey: "media_id"
}
ifox
07/07/2021, 9:04 AMifox
07/07/2021, 9:04 AM