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

Can't read new config variables in laravel 5.4

I added a new config variable to the config/app.php file in laravel like this 'foo' => 'pass' but when I tried reading it using config('app.foo') I keep getting null while other variables return correct values. What do I need to do?
mojoblanco
  • 683
  • 1
  • 7
  • 17
11
votes
2 answers

laravel-5.4 - error :Creating default object from empty value

I want to store image path in database. My Controller code undervendor\laravel\framework\src\Illuminate\Foundation\Auth\RegistersUsers.php follows: public function register(Request $request) { $this->validator($request->all())->validate(); …
dynamic
  • 197
  • 1
  • 3
  • 13
11
votes
6 answers

Only User Model is saving with empty Values to database

In Laravel 5.4 when I try to save User model to the database the values are not saved. I've set the fillable property as well. It was working in Laravel 5.3. This issue is coming after upgrading the application into Laravel 5.4. Below is a User…
Viral Solani
  • 840
  • 1
  • 9
  • 31
11
votes
2 answers

Default values for Laravel 5.4+ blades new components?

Laravel 5.4+ allows for components of the following structure:
{{ $title }}
{{ $slot }}
Which are called like: @component('alert', ['type' => 'danger']) …
Chris
  • 54,599
  • 30
  • 149
  • 186
11
votes
14 answers

How to remove query string page from the first page of laravel pagination?

I'm using laravel-5.4 pagination like the following: public function index() { $jobs = Job::paginate(5); return view('job.index', compact('jobs')); } In the view: {{ $jobs->links() }} There is a problem of generating two…
SaidbakR
  • 13,303
  • 20
  • 101
  • 195
11
votes
4 answers

mariaDB JSON support in Laravel

I'm trying to create a json database in XAMP, while using the phpmyAdmin it showed me that I'm using mariaDB but in my xamp-control panel v3.2.2 it shows running mySQL on port 3306. I'm using Laravel 5.4 framework to create the database, following…
Nitish Kumar
  • 6,054
  • 21
  • 82
  • 148
11
votes
4 answers

How correctly install latest Bootstrap version into my Laravel 5.4 web application?

I am pretty new in PHP and moreover in Laravel and I have the following problem: I have to correctly install latest Bootstrap CSS framework version into my Laravel application. Into the Bootstrap download page:…
user7540582
10
votes
2 answers

Laravel- use @foreach in markdown mail

I am trying to use @foreach loop inside markdown template for sending mails. While using HTML tags inside @foreach, it is not rendered properly @component('mail::message') These are the latest contents in our website @foreach($results as $type =>…
Ajith S
  • 2,907
  • 1
  • 18
  • 30
10
votes
1 answer

The "--queued" option does not exist in Laravel 5.4

I'm going to create Queue job for mailing. once I hit the artisan command in command prompt php artisan make:job SendSMSMessages --queued I got the issue as is follow. The "--queued" option does not exist. I'm using Laravel 5.4 Please anyone can…
HItesh Tank
  • 636
  • 1
  • 6
  • 13
10
votes
1 answer

laravel eager loading using with() vs load() after creating the parent model

I am creating a Reply model and then trying to return the object with it's owner relation. Here is the code that returns an empty object: //file: Thread.php //this returns an empty object !!?? public function addReply($reply) { $new_reply =…
Yeasir Arafat Majumder
  • 1,222
  • 2
  • 15
  • 34
10
votes
2 answers

Laravel 5.4 wrongly mix HTML components in Markdown Mailable

I had ordinary Mailable that had some hardcoded content. I've published mailable views, changed content to markdown and replaced ->view with ->markdown. Now mail have nicely formated markdown. However Laravel after compiling that markdown will pick…
przemo_li
  • 3,932
  • 4
  • 35
  • 60
10
votes
1 answer

laravel how to validate as equal to a variable

in laravel validation (registering) i want to compare one of the fields with a php variable (it should be equal with that) how can i do this? protected function validator(array $data) { return Validator::make($data, [ 'name' =>…
K1-Aria
  • 1,093
  • 4
  • 21
  • 34
10
votes
3 answers

Laravel login as another user

I am currently developing a laravel app where there are 3 user_roles Superadmin Admin Normal So each role can access the roles below him. e.g Superadmins can access admins and normal users account. How do I allow a authenticated superadmin user to…
Paul Ryan Lucero
  • 521
  • 1
  • 3
  • 16
10
votes
2 answers

Laravel Route issues with Route order in web.php

I have problem with routes in Laravel, I'm following one tutorial and we have this routes listed in web.php file Route::get('/home', 'HomeController@index')->name('home'); Route::get('/blog',…
Igor Šumonja
  • 101
  • 1
  • 5
10
votes
4 answers

Laravel 5.4 - How to set PDO Fetch Mode?

The ability to customize the fetch mode was removed from L5.4 and is defaulted to PDO::FETCH_OBJ. The upgrade guide states that you can override this by using an event listener: Event::listen(StatementPrepared::class, function ($event) { …
Edward
  • 311
  • 2
  • 11