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
25
votes
9 answers

laravel 5.4 embed image in mail

I have just upgraded my 5.2 install of laravel to 5.3 and then to 5.4 following the official upgrading methods. I am now trying to use one of the new features, to create a markdown formated email. According to the documentation found at:…
Angelin Calu
  • 1,905
  • 8
  • 24
  • 44
25
votes
2 answers

Laravel: How to enable stacktrace error on PhpUnit

I have a fresh installation of laravel 5.4 I've tried to modify the default test just to see a failing test. tests/ExampleTest.php class ExampleTest extends TestCase { /** * A basic test example. * * @return void */ …
Jaime Sangcap
  • 2,515
  • 6
  • 27
  • 45
24
votes
3 answers

Registering User with Laravel Passport

I set up password grant (it's backend for an app). Now, I can send a post request to oauth/token and it works on Postman. However, what if I want to register user from the api too? I understand I can use current /register route, however, then will I…
senty
  • 12,385
  • 28
  • 130
  • 260
24
votes
4 answers

How to validate an input field if value is not null in Laravel

I am trying to create and update users with laravel 5.4 This is the validation added for create user. It works. $this->validate($request, [ 'name' => 'required|max:255', 'email' => 'required|email|max:255|unique:users', 'password' =>…
noufalcep
  • 3,446
  • 15
  • 33
  • 51
24
votes
3 answers

How to use patch request in Laravel?

There is entity User that is stoted in table Users Some fields in this table are null by default. I need to update these fields and set not null data. For this I try to use PATCH method in Laravel: Routing: Route::patch('users/update',…
Darama
  • 3,130
  • 7
  • 25
  • 34
23
votes
8 answers

Disable error reporting entirely in Laravel production?

I would like to disable error reporting entirely on production, because we have some very old code we still need to fix but for now does work (yes I don't like it either). We cannot fix everything in a few days, so we need to just supress the…
online Thomas
  • 8,864
  • 6
  • 44
  • 85
23
votes
5 answers

How to set high, low and medium priority email using queue?

I am studying Job dispatching from here Problem I read that each connection has queue parameter which tell the queue name. Question is: How can I set the priority to send low or medium or high priority email? Cmd prompt I am using command: php…
Pankaj
  • 9,749
  • 32
  • 139
  • 283
22
votes
2 answers

Check if input is from console

I want to share a variable of my views with: class AppServiceProvider extends ServiceProvider { /** * Bootstrap any application services. * * @return void */ public function boot() { …
cre8
  • 13,012
  • 8
  • 37
  • 61
22
votes
5 answers

Laravel Validation Rules If Value Exists in Another Field Array

I am working in Laravel 5.4 and I have a slightly specific validation rules need but I think this should be easily doable without having to extend the class. Just not sure how to make this work.. What I would like to do is to make the…
GRowing
  • 4,629
  • 13
  • 52
  • 75
21
votes
4 answers

Using Laravel's Gate / Authorization in VueJs

I'm not sure how this hasn't been dealt with before, but how do I go about using VueJs and authorizing actions in Vue template? If I'm using Laravel's blade, this is easy (using @can directive), but there's no documentation or any way to perform…
Steve Bauman
  • 8,165
  • 7
  • 40
  • 56
21
votes
4 answers

Laravel set global variable for all custom helpers,controllers, and models

i've ever asked this question before in codeigniter, now I want to ask about this in laravel. I want to set a global variable for custom helpers, models, and controllers the variable is got from database result.. Here is the example: don't know…
Willyanto Halim
  • 413
  • 1
  • 6
  • 19
21
votes
3 answers

Laravel 5.4 change the subject of markdown mail

I have used markdown mailables which is a new feature in laravel 5.4. I have successfully implemented a mail sender. It seems, the subject of the mail is named as the name of the mailable class. I need to change the subject of the mail and it's hard…
Shashika
  • 1,606
  • 6
  • 28
  • 47
21
votes
10 answers

Laravel Passport token lifetime

I don't get what I'm doing wrong. I can't set token expiration time. registerPolicies(); …
Terion
  • 2,396
  • 3
  • 28
  • 42
20
votes
4 answers

Class tableseeder does not exist (although it really exists) :S

I get this error when trying to migrate plus seeding my database using laravel 5.4 [ReflectionException] Class PostTagTableSeeder does not exist In fact the file really exist with correct class name seeds/PostTagTableSeeder.php
Yasser Moussa
  • 2,209
  • 6
  • 26
  • 39
20
votes
5 answers

How to use multiple OR,AND condition in Laravel queries

I need help for query in laravel My Custom Query: (Return Correct Result) Select * FROM events WHERE status = 0 AND (type="public" or type = "private") how to write this query in Laravel. Event::where('status' , 0)->where("type" ,…
M Arfan
  • 4,384
  • 4
  • 29
  • 46