Answer the question
In order to leave comments, you need to log in
How to solve problem with root in ubuntu and need to change images from website?
I'm trying to upload images to the admin panel as in this video https://youtu.be/EgjHlT_ExSw?t=17m2s gives the same error, but nothing changes when changing write permissions, there may be some other reasons for this error.
Project - the projects model
<?php namespace App;
use Illuminate\Database\Eloquent\Model;
class Project extends Model {
protected $table = 'projects';
public function galleries()
{
return $this->hasMany('\App\Gallery');
}
}
<?php
return [
'title' => 'Projects',
'single' => 'project',
'model' => '\App\Project',
'columns' => [
'id',
'active',
'title'
],
'edit_fields' =>[
'active' =>[
'type' => 'bool'
],
'title' => [
'type' => 'text'
],
'slug' => [
'type' => 'text'
],
'content' => [
'type' => 'wysiwyg'
],
'image' => [
'type' => 'image',
'location' => public_path().'/uploads/project/original',
'sizes' => [
[500, 500, 'auto', public_path().'/uploads/project/medium/', 100],
[1000, 800, 'auto', public_path().'/uploads/project/large/', 100]
]
]
],
'form_width' => 800,
];
'sizes' => [
[500, 500, 'auto', public_path().'/uploads/project/medium/', 100],
[1000, 800, 'auto', public_path().'/uploads/project/large/', 100]
]
]
<?php
return [
'title' => 'Slides',
'single' => 'slide',
'model' => '\App\Slider',
'columns' =>[
'id',
'active',
'image' =>[
'output' => '<img src="/uploads/slides/small/(:value)" />'
]
],
'edit_fields' =>[
'active' =>[
'type' => 'bool'
],
'weight' => [
'type' => 'number'
],
'image' => [
'type' => 'image',
'location' => public_path().'/uploads/slides/original/',
'sizes' => [
[100, 100, 'auto', public_path().'/uploads/slides/small/', 100],
[1000, 800, 'auto', public_path().'/uploads/slides/large/', 100]
],
]
]
];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question