Questions tagged [laravel-5.5]

Laravel 5.5 is a previous version, but the current LTS version, of the open-source PHP web framework created by Taylor Otwell. It was released on August 30, 2017. Use it in addition to the laravel-5 tag if your question is specific to Laravel 5.5. Use the laravel tag for general laravel related questions.

Laravel 5.5 is a previous version, but current LTS version, of Laravel 5. It was released on August 30,2017.

What is new:

  • New Whoops integration
  • Streamlined Request Validation
  • Fresh Migrations
  • Frontend Presets
  • Automatic Package Discovery
  • Silky Smooth Custom Validation Rules
  • Collection Dumping
  • Model Factory Generation
  • Custom Blade "If" Directives
  • Auto-Registering Artisan Commands
  • Higher Order Tap
  • Optional Objects
  • New API Resources

Resources:

2496 questions
8
votes
3 answers

Laravel: How to verify if model was changed

Is there a simple way for the Eloquent save method to check if a row has actually changed? Something like affected_rows for Eloquent? The only workaround that I found was from Laravel Eloquent update just if changes have been made to do: $user =…
Adam
  • 25,960
  • 22
  • 158
  • 247
8
votes
2 answers

How do you pause a Laravel queue

I have a queue that sends requests to a remote service. Sometimes this service undergoes a maintenance. I want all queue tasks to pause and retry in 10 minutes when such situation is encountered. How do I implement that?
Poma
  • 8,174
  • 18
  • 82
  • 144
7
votes
5 answers

could not find driver in laravel

As I run php artisan migrate command it output In Connection.php line 664: could not find driver (SQL: select * from information_schema.tables where t able_schema = employee and table_name = migrations) In PDOConnection.php line 47: …
Ankit Bihani
  • 105
  • 1
  • 1
  • 4
7
votes
1 answer

Laravel 5: how to reset builtin throttle / ratelimiter?

Im using Laravel's builtin throttle like this: //File: Kernal protected $middlewareGroups = [ 'api' => ['throttle:10,3'] ]; However, I would like to reset the count after certain action in one of my controllers (for example after successful login).…
Raheel Hasan
  • 5,753
  • 4
  • 39
  • 70
7
votes
3 answers

Laravel 5 sending mail to multiple users at once

I am trying to sending mails to all users. But i can't figure out how to make this. In my controller, i made this. public function send_mail() { $mails = Joinus::all(); $array = array(); $allmails = array(); foreach ($mails as…
Ali Özen
  • 1,525
  • 2
  • 14
  • 29
7
votes
5 answers

Laravel Broadcast - Combining multiple middleware (web, auth:api)

I am using Laravel Event Broadcast and Pusher to utilize websockets both on my API and Web. If I try them individually, both work fine. What I mean is: Broadcast::routes(['middleware' => 'web']); // this works for my Laravel…
senty
  • 12,385
  • 28
  • 130
  • 260
7
votes
5 answers

Laravel - Include assets on Middleware Auth

Inside my app, exist a route group called admin, any route inside this group call two resources: public/css/admin.css and public/js/admin.js, but any unauthenticated user has access to these files. How can I include these files inside the Auth…
Caio Kawasaki
  • 2,894
  • 6
  • 33
  • 69
7
votes
4 answers

How to retrieve data from the latest date in laravel?

In mySql, I can perform to data of latest date as follows: select * from tbl where date = 'select max(date) from tbl'; But I don't know how to do this is laravel? How to do it?
Sushila Singh
  • 215
  • 2
  • 3
  • 7
7
votes
2 answers

Laravel dump() unexpected output

Using Laravel 5.5.34, I have trouble outputting debug information in Blade templates using the dump() helper. {{ dump('test') }} results in the following output: I wouldn't expect the raw string "test" to show up below the actual debug output. Is…
ciruvan
  • 5,143
  • 1
  • 26
  • 32
7
votes
1 answer

Laravel artisan tinker - "quiet mode" - don't print query results

How can I store the results of an Eloquent query to a variable in tinker, without printing the results to the console? For example, when I run $threads = App\Thread::all() I want to only store the results in the variable $threads without seeing all…
Amade
  • 3,665
  • 2
  • 26
  • 54
7
votes
3 answers

Override created_at value

I'm trying to insert date into created at but nothing worked I tried to use create as normal $this->create([ 'product_id' => "$id", 'shop_name' => $shop,'created_at' => $date ]); I tried to change the date format to match laravel $date =…
Joumana Issa
  • 113
  • 1
  • 1
  • 6
7
votes
2 answers

Laravel : Class controller does not exist

I have created a simple controller and define a function. But when i run this it returns an error that controller does not exist. In my web.php assign a route.
Javed
  • 817
  • 4
  • 22
  • 44
7
votes
1 answer

Laravel use custom USER-Model in package

I´ve developed a package stored in LaravelRoot/packages/myname/project/ in Laravel. Inside my package i´ll have to use an extended user-model containing a relationship not mentioned in the default usermodel. Now here is my question: How can i…
NeronNF
  • 98
  • 1
  • 7
7
votes
5 answers

Solve issue of upgrading to php 7.2 in laravel 5.4 application

I have Upgraded my laravel application php version to php 7.2 this week and from then I am facing big problems in my laravel application. before upgrading php to 7.2 every thing worked pefectly. the main issue is about count() and array_merge()…
atieh mokhtary
  • 253
  • 2
  • 5
  • 18
7
votes
3 answers

How to get validated data from Validator instance in Laravel?

I manually created a Validator, but i can't find a method to get the validated data. For Request, validated data return from $request->validate([...]) For FormRequest, it's return from $formRequest->validated() But with Validator, i don't see a…
kble
  • 353
  • 1
  • 5
  • 10