Questions tagged [laravelcollective]

Use for questions about use of or contribution to the LaravelCollective; a collection of Laravel components such as Annotations, Html, Form, SSH, that have been removed from the core Laravel framework.

As the Laravel PHP Framework has grown, and the set of core components has been refined, some components that were once part of the core features have been removed.

The Laravel Collective Community exists to continue support and evolution of these components.

Documentation for LaravelCollective Packages.

List of Laravel Collective components

  • bus: Laravel Command Bus
  • html: HTML and Form Builders for the Laravel Framework
  • remote: Remote SSH Access for the Laravel Framework
  • iron-queue: IronMQ Driver For Laravel Queue
  • annotations: Route and Event Annotations for the Laravel Framework

References

277 questions
35
votes
3 answers

Laravel pluck fields from relations

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(),…
Alan
  • 2,319
  • 3
  • 25
  • 46
19
votes
4 answers

Distinct values with pluck

I'm trying to retrieve data from database and bind them to a html select tag, and to bind them i need to use pluck so i get the field i want to show in a array(key => value), because of FORM::select. The normal pluck gets all the results, while i…
Arlind Hajdari
  • 385
  • 1
  • 3
  • 12
18
votes
3 answers

Add icon to Laravelcollective submit button

I'm trying to add a trash icon to submit button and I tried this : {!! Form::submit('', ['class' => 'btn btn-warning btn-sm fa fa-trash']) !!} but the icon won't show. How to solve this ? thanks in advance!
Ariando Miller
  • 1,261
  • 3
  • 18
  • 40
16
votes
5 answers

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

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…
carbide20
  • 1,605
  • 4
  • 24
  • 46
13
votes
2 answers

laravel 5.4 : Laravelcollective/html v5.3.0 requires illuminate/view 5.3.*

I was using Laravelcollective/html v5.3.0 with laravel 5.3. Now i am using laravel 5.4. I have forms which are using Laravelcollective/html v5.3.0. The composer require laravelcollective/html gives me the following error: Installation request for…
Gammer
  • 4,655
  • 13
  • 58
  • 100
12
votes
3 answers

How can I include html within a form label using Laravel Collective?

Reading through this SO thread I have read that I can create a new macro to create custom form inputs. I am brand new to Laravel development (big surprise) & it seems a tad overkill for such a small thing. Is there a "simpler" way to have something…
Damon
  • 3,202
  • 4
  • 30
  • 64
9
votes
1 answer

Laravel collectivehtml secure route or url

in my view page I have this route: {!! Form::open(['url' => 'forumcomment/' . $forum->slug, 'files'=>false, 'id' => 'qw-commentform' ,'class' => 'qt-clearfix']) !!}
{!!…
Sid Heart
  • 695
  • 14
  • 33
9
votes
3 answers

How to set custom data-attribute to option with Laravel Collective

I have a form, inside I have a select with some options and I'm using Laravel Collective Forms to build it, I have something like: {!! Form::select('size', $data, $selecteds, ['multiple' => true]) !!} All going well until here, but now I need to…
Sredny M Casanova
  • 3,578
  • 10
  • 47
  • 93
8
votes
2 answers

Use inside Form Label in Blade template

In html I can use tag inside form label like this: Using Laravel Blade, the code for label is like this: {!! Form::label('name','Name:',['class'=>'class-name'])…
smartrahat
  • 4,455
  • 5
  • 39
  • 62
7
votes
1 answer

how to apply css class to laravel collective select

i used laravel 5.3 for my project, i used laravel form collective into it code is below {{ Form::select('size', ['surat' => 'surat', 'mumbai' => 'mumbai','hongkong' => 'hongkong'], 'hongkong',['multiple'=>'true'], array('class'=> 'form-control') )…
HirenMangukiya
  • 585
  • 1
  • 11
  • 28
7
votes
1 answer

Switching from Illuminate\Html to Collective\Html, Class 'Illuminate\Html\HtmlServiceProvider' not found

I updated composer.json to remove illuminate\html and add: "require": { "laravelcollective/html": "5.1.*" I removed the providers/aliases from app.php for Illuminate\Html and added the replacements: …
Dylan
  • 818
  • 13
  • 20
6
votes
4 answers

UnexpectedValueException Could not parse version constraint when trying to instal laravelcollective

I am new to laravel and I am trying to install laravelcollective. I am just following to documentation here and I am using this from my project directory: composer require "laravelcollective/html":"^5.4.0" Unfortunately, immediately after I press…
incense_stick
  • 478
  • 1
  • 6
  • 13
5
votes
1 answer

Auto populate "Form::text" from "Form::model" after adding extra attribute(class) in Laravel

I am currently rendering and populating a form in laravel using the laravelcollective plugin. this is working as expected: {!! Form::model($user, ['action' => 'user@updateUser']) !!}
{!! Form::label('user_name', 'Name')…
steve
  • 365
  • 2
  • 10
5
votes
3 answers

Laravelcollective html form errors are not working

Error: BadMethodCallException in FormBuilder.php line 1208: Method hasErrors does not exist. So I have installed Laravelcollective as usual, and most aspects are working. My composer.json "laravelcollective/html": "~5.0", And in my config/app.php…
user6369603
5
votes
3 answers

laravel collective checkbox form

I'm trying to implement checkbox and laravel collective in my form but I get only single value in form, any ideas how to fix it {!! Form::open(array('action'=>'UserController@updateInfo','method'=>'post')) !!} Workdays:
{!!…
Night5talker
  • 451
  • 1
  • 7
  • 22
1
2 3
18 19