Questions tagged [laravel-5.4]

Laravel 5.4 is a past version of the open-source PHP web framework replaced by 5.5 version created by Taylor Otwell. It was released on January 24, 2017. Use it in addition to the laravel-5 tag if your question is specific to Laravel 5.4. Use the laravel tag for general laravel related questions.

What is new:

  • Markdown Mail & Notifications
  • Laravel Dusk - BrowserKit testing replaced with ChromeDriver
  • Laravel Mix replaces Laravel Elixir
  • Blade Components & Slots
  • Implicit model binding for broadcast channels
  • Collection Higher Order Messages
  • Object Based Eloquent Events
  • Job Level Retry & Timeout
  • Request Sanitization Middleware
  • Realtime Facades
  • Custom Pivot Table Models
  • Improved Redis Cluster Support

Resources:

Other notable tags:

4188 questions
16
votes
4 answers

Undefined property: Illuminate\Database\Eloquent\Relations\BelongsTo::$name laravel 5.4

Hi following are my relations User Model public function loginlogout() { $this->HasMany("App\Models\LoginLogoutLogs"); } and this is my LoginLogoutLogs Model public function users() { return…
noobie-php
  • 6,817
  • 15
  • 54
  • 101
16
votes
4 answers

Getting cURL error 3: malformed (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) error after saving models in laravel 5.4

I am having this error cURL error 3: malformed (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) after saving/creating multiple models to database. I have this in my controller: public function storeTruck(Request $request){ //Save…
Jay Marz
  • 1,861
  • 10
  • 34
  • 54
16
votes
7 answers

Laravel: Integrating Throttle in Custom Login

How to integrate laravel throttle if I did not use the default LoginController given by laravel? here's my controller: use AuthenticatesUsers; //function for login public function login(Request $requests){ $username =…
JaneTho
  • 321
  • 1
  • 2
  • 13
16
votes
5 answers

Laravel Factory: Manual Increment of Column

For the following factory definition, the column order needs to be sequential. There is already a column id that is auto-incremented. The first row's order should start at 1 and each additional row's order should be the next number (1,2,3,…
bnahin
  • 796
  • 1
  • 7
  • 20
16
votes
2 answers

Auth guard [admin] is not defined

Hello i am new to laravel i am following a tutorial to make admin page when i used admin auth guard but when i tried to access admin page "www.school.dev/admin" i saw this error This is my config/auth.php
Yasser Moussa
  • 2,209
  • 6
  • 26
  • 39
16
votes
5 answers

Laravel: Seeding multiple unique columns with Faker

Introduction What up folks, I got a question about model factories and multiple unique columns: Background I have a model named Image. This model has language support stored in a separate model, ImageText. ImageText has an image_id column, a…
Rkey
  • 690
  • 2
  • 8
  • 25
16
votes
2 answers

Laravel seeding results in Null timestamp

So i had a seeder for Languages Table (LanguageTableSeeder) as follows: DB::table('languages')->insert([ 'name' => 'English', 'flag' => '', 'abbr' => 'en', 'script' => 'Latn', 'native' => 'English', …
Jhivan
  • 195
  • 1
  • 1
  • 8
15
votes
3 answers

Laravel send password reset link to a separate authentication guard

In Laravel 5.4, is there a way to send the password reset link to a separate authentication guard instead of the default one. I am using the default PasswordResetController which does the job in this way public function company(Request $request) …
Cowgirl
  • 1,454
  • 5
  • 19
  • 40
15
votes
3 answers

How {{ Auth::user()->name }} is able to print username in blade file?

I have been working in default authentication features in laravel..I found in one blade file Auth::user()->name is able to display name stored in user table..But what i want to know is how it is able display name in blade with an eloquent call.
siva sandeep
  • 557
  • 1
  • 5
  • 17
15
votes
2 answers

How to integrate Swagger in Lumen/Laravel for REST API?

I have built some REST API in Lumen micro framework and it's working fine. Now I want to integrate Swagger into it so the API will be well documented on future use. Has anyone done this?
Anand Pandey
  • 2,025
  • 3
  • 20
  • 39
15
votes
1 answer

Laravel 5.4 - 'updateOrCreate' method. Check If record was 'updated' or 'created'

Using the method updateOrCreate, is there a way to know which if a record was updated or created? UPDATE: I need to use this feature to return 201, for created record, or 204 for updated record. Thank you.
vlauciani
  • 1,010
  • 2
  • 13
  • 27
15
votes
5 answers

Route [password.reset] not defined in laravel 5.4 in ResetPasswords.php

I'm getting this error in my custom app: InvalidArgumentException in UrlGenerator.php line 304: Route [password.reset] not defined. I know laravel provides a password reset functionality out of the box but I want to write my own class and…
Salar Bahador
  • 1,433
  • 1
  • 14
  • 26
15
votes
1 answer

Custom helper classes in Laravel 5.4

I have some helper classes in app/Helpers. How do I load these classes using a service provider to use them in blade templates? e.g. If I have a class CustomHelper that contains a method fooBar() :
byteseeker
  • 1,335
  • 2
  • 13
  • 22
15
votes
4 answers

Listen callback is not working in Pusher API Laravel 5.4

Problem I can confirm that Pusher API is receiving the message. I saw in Debug console of Pusher website. But listen callback is not working at all. I am following this tutorial to implement Pusher in Laravel 5.4 Below were the step by step things…
Pankaj
  • 9,749
  • 32
  • 139
  • 283
14
votes
2 answers

Code coverage for laravel dusk

Is there any way to get code coverage when running Laravel Dusk? I know it runs browser tests so it's not scrutinizing code, but is there a way to add a listener to check what code is covered? I did not see anything on this subject now.
rap-2-h
  • 30,204
  • 37
  • 167
  • 263