Questions tagged as 'laravel'

0
answers

How to pass more than one Can middleware on laravel?

Hello, I need to pass several defines to a route, for example admin, annual plan, and new-user, when I put can in the middleware it only identifies the first parameter. AuthServiceProvider.php Gate::define("new-user","App\Policies\ACLChecke...
asked by 11.10.2018 / 23:20
1
answer

How to make an orderBy in laravel?

I have this orderBy , but it is not working as it should, for example: $query = $query->where( 'approved', 1 ) ->orderBy('featured',1) ->orderBy('priority',1) ->orderBy('created_at...
asked by 17.10.2018 / 15:02
1
answer

Symbolic link does not work on Laravel

I'm trying to make a folder public within the Laravel storage directory, but I did not succeed. The folder being made public is in the path: project/storage/app/images Yes, outside the public . I've already tried to create symblink no...
asked by 17.10.2018 / 03:59
0
answers

Too few arguments to function laravel

I created a route to register users of laravel: Route::post('registrar', 'Auth\RegisterController@create'); My class: <?php namespace App; use Illuminate\Notifications\Notifiable; use Illuminate\Contracts\Auth\MustVerifyEmail; use Il...
asked by 06.10.2018 / 00:46
0
answers

Store the S3 URL in the database table

I'm developing an application where I upload and files to AWS S3, just images. if($request->hasFile('cover')){ $file = $request->file('cover'); $name = time().$file->getClientOriginalName(); $filep...
asked by 05.10.2018 / 19:41
0
answers

Error when listing routes in a Api Laravel

I am developing an api rest using laravel and to create this api I am using the tutorial: link link link But when you run the command: php artisan route:list I get the following error: ReflectionException:Class App\Http\...
asked by 13.10.2018 / 23:04
1
answer

Laravel Excel I do not understand what is being filled

I do not understand what's happening in this code that populates a cell B8 in excel: $sheet->cell('BQ'.$i, function($cell) use($report) { $cell->setValue(!empty($report->PastaStatusHistorical->where('status_historical.status','...
asked by 03.10.2018 / 20:18
1
answer

Laravel dynamic route

I have the following question. Is it correct to create a dynamic route to return my views, or do I have to create a route for each controller and return the proper view? Example of the code I'm using route file Route::get('/{url?}/{url2?...
asked by 09.10.2018 / 23:13
0
answers

Laravel can not find my class

I have a controller that is located at: app/Http/Controllers/Auth/LoginController that has the login function. I created a route in my api.php for when login hit my method access: Route::post('login', 'Auth\LoginController@login')...
asked by 06.10.2018 / 16:05
2
answers

method Auth :: attempt laravel is not logging in

I'm trying to use the Auth :: attempt method to log in to my api, but it always falls on the else, even though it has the correspondence of that email / password in the database. Where can I configure this method Auth :: atempt? I think he shoul...
asked by 06.10.2018 / 16:46