Questions tagged [laravel-5.8]

Laravel 5.8 is the previous stable version of the open-source PHP web framework created by Taylor Otwell. It was released on February 26, 2019. Use it in addition to the [laravel-5] tag if your question is specific to Laravel 5.8. Use the [laravel] tag for general Laravel related questions.

Laravel 5.8 is the previous stable version of the open-source PHP web framework created by Taylor Otwell. It was released on February 26, 2019.

What is new:

  • Eloquent HasOneThrough Relationship
  • Auto-Discovery Of Model Policies
  • PSR-16 Cache Compliance
  • Multiple Broadcast Authentication Guards
  • Token Guard Token Hashing
  • Improved Email Validation
  • Default Scheduler Timezone
  • Intermediate Table / Pivot Model Events
  • Artisan Call Improvements
  • Mock / Spy Testing Helper Methods
  • Eloquent Resource Key Preservation
  • Higher Order orWhere Eloquent Method
  • Artisan Serve Improvements
  • Blade File Mapping
  • DynamoDB Cache / Session Drivers
  • Carbon 2.0 Support
  • Pheanstalk 4.0 Support

Resources:

1845 questions
5
votes
4 answers

Filtering existing query by date

This has yet to be answered with a functional answer. I have a few methods that Ive put together for some fun stats on a game I play often. The method below will take the total count of all games played, match a player to the player list then show a…
levi
  • 1,566
  • 3
  • 21
  • 37
5
votes
2 answers

Array to collection access with arrows?

If I build a collection from an array: $collection = collect(['name' => 'john', 'age' => '20']); How can I access it like you access models, e.g. $collection->name; //john I'm having to use $collection['name']. Is there a way to access it with…
panthro
  • 22,779
  • 66
  • 183
  • 324
5
votes
1 answer

Laravel 5.8 - Class 'Arr' not found

I've upgraded to Laravel 5.8 One of the changes as per the docs in 5.8 is that All array_* and str_* global helpers have been deprecated (https://laravel.com/docs/5.8/upgrade#string-and-array-helpers) In my blade view I have the following: {{…
adam78
  • 9,668
  • 24
  • 96
  • 207
5
votes
2 answers

Issue while trying to pass json of translation key-value from laravel blade to vue.js

This is my translation file return [ "Key1" => "Message 1", "Key2" => "Message 2", "Key3" => "Message 3", "Key4" => "Message 4", "Key5" => "Message 5", "Key6" => "Message 6", "Key7" => "Message 7", "Key8" => "Message…
Pankaj
  • 9,749
  • 32
  • 139
  • 283
5
votes
2 answers

Laravel 5.8 syncing / attaching / detaching events

Laravel 5.8 is supposed to dispatch the syncing, attaching and detaching events (https://laravel.com/docs/5.8/releases search for Intermediate Table / Pivot Model Events section). UPDATE: the release notes have been update after posting this…
Dan
  • 3,329
  • 2
  • 21
  • 28
5
votes
1 answer

Laravel sends JSON headers in body

I have the following class that handles JSON responses for me:
Bird87 ZA
  • 2,313
  • 8
  • 36
  • 69
4
votes
3 answers

Limit laravel log file size

I'm new to Laravel, we are using Laravel 5.8, and I have seen horror stories where the log is set to daily rotation, yet still reaches 1gb+ (I saw someone had their log reach over 400gb overnight). Is there a way to split log files up and/limit the…
Tal C
  • 547
  • 1
  • 8
  • 17
4
votes
1 answer

Laravel Custom FormRequest in PHPUnit env

Okay so, I've tried searching for a while now for solutions on how and why this is happening, here it goes. On production environment, this chunk of code works just fine. public function store(Add $request) { $data = $request->validated(); …
abr
  • 2,071
  • 22
  • 38
4
votes
1 answer

Cookie XSRF-TOKEN created without the httponly flag - Laravel 5.8

I am using Laravel 5.8 . I use Nikto to scan my site, I saw these issues. Cookie XSRF-TOKEN created without the httponly flag How do I patch these issues in my Laravel Site ? I've tried , but it clearly not wotking. :( header('X-XSS-Protection',…
code-8
  • 54,650
  • 106
  • 352
  • 604
4
votes
3 answers

Should I check in bootstrap/cache - Laravel 5.8?

I'm using Laravel 5.8, these 2 files often show up on my git status. Should I add them to .gitignore ?
code-8
  • 54,650
  • 106
  • 352
  • 604
4
votes
2 answers

Httponly cookie not being set / stored (Laravel / Vue)

I have been struggling with this for a few hours now on how to solve this issue and I just can't seem to be able to get around it for now. Am building a simple authentication system with a Vue front-end(created using vue-cli) and Laravel 5.8(api)…
kellymandem
  • 1,709
  • 3
  • 17
  • 27
4
votes
0 answers

How can I have multiple CRUD entities inside the same page? [Backpack 4.0]

What I did Back when I was using Backpack 3.6, I've created a trait called RelatedCrud and set up everything in order to have more than one CRUD inside the same page. To better explain myself with an example, I had the CRUD page "Note", which…
Pat
  • 41
  • 1
  • 4
4
votes
1 answer

A non well formed numeric value encountered in var/www/html/admin/vendor/nesbot/carbon/src/Carbon/Traits/Units.php

I am using laravel 5.8. I am getting an exception in file /var/www/html/admin/vendor/nesbot/carbon/src/Carbon/Traits/Units.php at line // @call addRealUnit case 'minute': $value *= static::SECONDS_PER_MINUTE; …
Rishikesh Singh
  • 85
  • 2
  • 10
4
votes
3 answers

How to log user in via API - Laravel 5.8?

I'm using Laravel 5.8, with PHP 7.2. I need to adjust the way I did the Authentication. before I used to log my users in via my local database from users table. If the email+password match, I log them in. $email =…
code-8
  • 54,650
  • 106
  • 352
  • 604
4
votes
2 answers

How to retry all failed jobs from Redis queue in Laravel Horizon

How can you retry all failed jobs in Laravel Horizon? There appears to be no "Retry All" button and the artisan command doesn't work as the failed jobs aren't stored in a table.
Dally
  • 1,281
  • 4
  • 18
  • 37