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
4
votes
2 answers

Integrity constraint violation: 19 NOT NULL constraint failed for something not in migration table

Using Laravel 5.8.31 I seem to be getting an integrity constraint violation for something in a table that should not be null. The issue is that its telling me posts.title in my migration file should not be null, but that variable is not even in the…
WhatAmIDoing
  • 85
  • 1
  • 6
4
votes
1 answer

How to create Laravel model from migration?

I found many results how to create migration from a model, but is there any way to create a model from migrations? Basically I want to give a table name, and if there is multiple migration files (one to create and others to update the previous…
netdjw
  • 5,419
  • 21
  • 88
  • 162
4
votes
0 answers

Laravel 5.8 not respecting $retryAfter specified in job class

I have a Laravel with some Jobs that are usually very quick to run. Hence I have configured my default retry_after in config/queue.php to 20 seconds 'database' => [ 'driver' => 'database', 'table' => 'jobs', …
Buno
  • 597
  • 1
  • 9
  • 20
4
votes
1 answer

Relation between two models with intermediate table

have spent hours on trying and failing, reading the documentation and trying to translate the documentation to a challenge I am facing in Laravel. The worst part is, I don't think the issue is that hard to solve, but somehow my head won't work…
rebellion
  • 6,628
  • 11
  • 48
  • 79
4
votes
1 answer

Object of class Illuminate\Routing\Redirector could not be converted to string. srmklive/laravel-paypal

I am currently working on a paypal checkout using paypal and https://github.com/srmklive/laravel-paypal. I'm using the express checkout which I modified it a little bit to fit the requirements of the my project. During testing it is working in a…
VIRUS 471
  • 65
  • 2
  • 7
4
votes
4 answers

SQLSTATE[HY000]: General error: 1364 Field 'title' doesn't have a default value

Hi I am trying to insert data into db but it says: SQLSTATE[HY000]: General error: 1364 Field 'title' doesn't have a default value (SQL: insert into projects (owner_id, updated_at, created_at) values (1, 2019-06-28 13:17:11, 2019-06-28…
pro
  • 609
  • 4
  • 17
  • 40
4
votes
2 answers

How to implement Laravel’s Must Verify Email feature in the API registration?

I implemented MustVerifyEmail interface in my user model class User extends Authenticatable implements MustVerifyEmail also I made VerificationApi Controller
Leona
  • 73
  • 3
  • 10
4
votes
1 answer

Pusher fails to connect in Laravel 5.8

I used Pusher with laravel 5.4 and and no issues but now i'm trying to use laravel 5.8 and i get the following error. I've tried everything i can think of and even changed the encrypted to false just incase. I triple checked my pusher…
Yosef
  • 442
  • 1
  • 7
  • 26
4
votes
1 answer

Laravel 5.8 on validation error return to specific view with all input -> old not working

TLDR; (In Laravel 5.8) Upon validation error, how can I return to a specific view with all input and the errors? I'm creating a multistep form in which I need to validate the input on each step. Therefore, I have created the first page as a create…
Brad Ahrens
  • 4,864
  • 5
  • 36
  • 47
4
votes
3 answers

Can't get user id in controller and Auth::check() is not working - Laravel 5.8

I am new to laravel 5.8 , am not able to use Auth in api controllers, below are the details : I have changed default users table from users to User User.php
ikuchris
  • 1,162
  • 1
  • 15
  • 33
4
votes
1 answer

How does Laravel Email Verification (technically) work?

I'm using the standard laravel registration system (php artisan make:auth) and i'm currently wondering how the verification of the mail in laravel works. I don't see any token or something else in the database that could be compared to the one from…
Marvin
  • 53
  • 3
4
votes
4 answers

Laravel - changing email settings on the fly is not working

All of my email settings for my app are stored in the database. The user has the option to change those settings, and it all works great. But I am trying to setup a "Send Test Email" function to allow users to test their settings before saving…
Ron Butcher
  • 489
  • 7
  • 16
4
votes
1 answer

Laravel Serve command does not respect --env parameter

To be able to run Browser tests directly in my IDE (without using the artisan dusk command), I want to run php artisan serve --env=dusk.local. While it indeed starts the local PHP server, it uses the wrong database. It uses the database specified in…
TimSch
  • 1,189
  • 1
  • 12
  • 27
4
votes
4 answers

Best way to validate Laravel Requests

In my Resource Controller I have a store and an update function with nearly the same validation rules. Because my validation is a bit more complicated I created a Request for this. But because the validation rules differ a bit, I have to create two…
no0by5
  • 632
  • 3
  • 8
  • 30
4
votes
1 answer

Laravel Dusk how to get multiple element's attributes?

I just began using Laravel Dusk on Laravel 5.8 and already faced an issue. Was searching a lot on Google, but haven't found an answer. $browser->visit('https://www.website.com') ->script('window.scrollTo(0, 1000);'); $elems = $browser …
Radical_Activity
  • 2,618
  • 10
  • 38
  • 70