laravelcollective

Class ' Form' not found in view-file.blade.php

≯℡__Kan透↙ 提交于 2019-12-01 18:42:06
I'm trying to render a text input field in my view file. I keep getting this error: "Class 'form' not found in view-file.blade.php" Template: @extends('layouts.app') @section('content') <h1>New</h1> {{ Form::open() }} {{ Form::text('my-name') }} {{ Form::close() }} @endsection Composer.json "require": { "php": ">=7.0.0", "fideloper/proxy": "~3.3", "laravel/framework": "5.5.*", "laravel/tinker": "~1.0", "laravelcollective/html": "^5.5.0" }, app.php (config) 'providers' => [ /* * Laravel Framework Service Providers... */ Illuminate\Auth\AuthServiceProvider::class, Illuminate\Broadcasting

Laravel 5 Class 'Collective\\Html\\HtmlServiceProvider' not found on AWS

不羁岁月 提交于 2019-11-30 17:43:18
I know there are a bunch of other questions floating around out there with the same error, such as: Class 'Illuminate\Html\HtmlServiceProvider' not found Laravel 5 My problem is that I've followed all suggested steps to solve this on my local (XAMPP), and it fixed it without a hitch. The issue is when I went to deploy to my AWS ubuntu box (nginx). I followed all the usual instructions: http://laravelcollective.com/docs/5.1/html#installation My providers and aliases had been added when I did a git pull from what I had pushed from my local. Perhaps this file should have been gitignored, and the

Laravel 5 Class 'Collective\Html\HtmlServiceProvider' not found on AWS

谁说我不能喝 提交于 2019-11-30 01:16:43
问题 I know there are a bunch of other questions floating around out there with the same error, such as: Class 'Illuminate\Html\HtmlServiceProvider' not found Laravel 5 My problem is that I've followed all suggested steps to solve this on my local (XAMPP), and it fixed it without a hitch. The issue is when I went to deploy to my AWS ubuntu box (nginx). I followed all the usual instructions: http://laravelcollective.com/docs/5.1/html#installation My providers and aliases had been added when I did a

Laravel pluck fields from relations

主宰稳场 提交于 2019-11-27 13:56:25
I have a Seller object which has a related User. I need to fill a select from LaravelCollective so I need to make something like this: {!! Form::selectGroup('seller_id', 'Seller', Seller::with('user')->pluck('user.first_name', 'id')->toArray(), null) !!} The problem is that I cannot take fields from relationships (user.first_name). How can I do it? UPDATE I want to avoid doing this... <?php $sellers = []; Seller::with('user')->get()->each(function ($seller) use (&$sellers) { $sellers[$seller->id] = $seller->user->first_name; }); ?> You can use Laravel's pluck method as: $sellers = Seller::with