Hi zofe. First of all thank you for the quality of your library. I'm facing this problem: I have a Dataform with an image field. 1) I'm trying to figure out how to make a deferredMove preserving the file extension of uploaded file: if I use
$myform->add('image', 'Immagine', 'image')->fit('300','200')->moveDeferred('uploads/products/', 'product_{{ $id }}') ;
the $id is expanded correctly but every other php instruction I insert in the blade brackets generates an exception. 2) is it possible to do the step 1) and generate at the same time a thumbnail for the uploaded image?
php artisan vendor:publish
php artisan clear-compiled
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Zofe\Rapyd\RapydServiceProvider' not found
intervention/imageˇ
Good news everybody
We just added a multiselect
field to the main branch, you can use it just like the checkboxgroup
(see the rapyd demo for clues). If you're still on Laravel 4.2 see this gist to learn how to implement it yourself.
The motivation is to let you easily use Select2
to implement constrained tag fields.
Hey guys!
I'm have a trouble:Project.php
:
class Project extends Model
{
public function projectType()
{
return $this->belongsTo(ProjectType::class);
}
}
ProjectType.php
:
class ProjectType extends Model
{
public function project()
{
return $this->hasMany(Project::class);
}
}
ProjectsController.php
:
class ProjectsController extends Controller
{
public function index()
{
$form = DataGrid::source(Project::with('projectType'));
$form->add('id', 'ID', true);
$form->add('projectType.title', 'Project type', true);
return view('projects.dataGrid', compact('form'));
}
}
routes.php
:
Route::group(['namespace' => 'Settings', 'prefix' => 'admin'], function() {
Route::any('projects', 'ProjectsController@index');
}
template.blade.php
:
@section('content')
{!! $form !!}
@stop
On /admin/projects?ord=-projectType.title
Laravel throws QueryException:SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table "projectType"
LINE 1: select * from "projects" order by "projectType"."title" desc
How to fix it? Related table is not loaded =(