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

How can I change the public path to something containing an underscore in Laravel Mix?

In Laravel 5.4 Mix was introduced to compile assets and maintain the asset pipeline. Mix defaults to your public directory being named public. In many cases, including mine, my public directory is called something else. In my case, it's…
Mike
  • 8,767
  • 8
  • 49
  • 103
19
votes
4 answers

How do I redirect to a URL with query parameters?

I am trying to do a redirect with query parameters, using the redirect() helper: $link = 'https://example.com' . '?key1=value1&key2=value2'; return redirect()->to($link); The problem is that when the $link is passed to the to() method Laravel…
lesssugar
  • 15,486
  • 18
  • 65
  • 115
19
votes
12 answers

Laravel 5.4 on Heroku. Forbidden You don't have permission to access / on this server

I have deployed my laravel 5.4 app on Heroku. The problem is, I am getting this error message: Forbidden You don't have permission to access / on this server My Procfile: web: vendor/bin/heroku-php-apache2 public/ Looking into the log, I find that…
Sijan Bhattarai
  • 570
  • 2
  • 6
  • 25
19
votes
4 answers

Remove a package using composer (without updating other packages)

I've currently installed a package "watson/sitemap". Now, I want to remove it without using "composer update" since it will update other packages which I don't want. Any help would be much appreciated.
papski
  • 1,241
  • 5
  • 28
  • 52
19
votes
5 answers

How to run multiple Laravel projects at same time?

To run one laravel project we only need to type "php artisan serve". and it will be available on port 8000. But sometimes we need to run multiple projects at the same time. How can we do this?
Amin Adel
  • 970
  • 3
  • 17
  • 33
19
votes
3 answers

Pusher Notification received by sender and working in Chrome only. Laravel 5.4 and JQuery

I am using Pusher API for sending notifications in Laravel 5.4 with JQuery. I found out that whenever I send notification from Firefox or Safari...it reaches chrome browser successfully but not vice versa. Another problem is that when I send…
Pankaj
  • 9,749
  • 32
  • 139
  • 283
19
votes
6 answers

Apply Middleware to all routes except `setup/*` in Laravel 5.4

I'm experimenting with Middleware in my Laravel application. I currently have it set up to run on every route for an authenticated user, however, I want it to ignore any requests that begin with the setup URI. Here is what my CheckOnboarding…
Andy Holmes
  • 7,817
  • 10
  • 50
  • 83
19
votes
3 answers

how to get all the headers information in laravel 5.4

when i print like: echo '
';
print_r(getallheaders());

it gives output 
[Host] => abc.com
    [User-Agent] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:51.0) Gecko/20100101 Firefox/51.0
    [Accept] =>…
Muhammad
  • 3,169
  • 5
  • 41
  • 70
18
votes
11 answers

Laravel dompdf error "Image not found or type unknown"

I am getting error "Image not found or type unknown" after downloading PDF in Laravel 5.4 using dompdf package. Here is the method public function pdf() { $users = User::get(); $pdf = PDF::loadView('pdf', compact('users')); …
Ahsan
  • 1,289
  • 3
  • 13
  • 37
18
votes
1 answer

How to integrate Facebook PHP SDK with Laravel 5.4?

I was searching for an easy way to integrate Facebook PHP SDK with Laravel 5.4. Essentially, I wanted to make it available as a service within my Laravel app. Of course there is SammyK/LaravelFacebookSdk on github. But for some reason I didn't…
Adam Ranganathan
  • 1,691
  • 1
  • 17
  • 25
18
votes
4 answers

Call to a member function store() on null - laravel 5.4

I'm trying to upload an image though everytime I submit it's returning that the store() on null error. I've set the form to enctype="multipart/form-data" which hasn't helped. Can anyone point me in the right direction? Thanks. Function inside the…
Erasersharp
  • 360
  • 1
  • 3
  • 13
18
votes
1 answer

Laravel 5.4 sometimes validation rules not working

I am trying to validate a date field only if it is present. It was working fine before I upgraded from Laravel 5.2 to 5.4 In Laravel 5.2 this rules works fine: public function rules() { return [ 'available_from' => 'date', ]; } In…
Munna Khan
  • 1,902
  • 1
  • 18
  • 24
17
votes
4 answers

Laravel - add foreign key on existing table with data

I have existing table objects with data. Now I need to add new table named holdings and add a relation from objects to holdings table. In the migration file, I print this: $table->foreign('holding_id')->references('id')->on('holdings')->onDelete("NO…
Alexander Guskov
  • 371
  • 1
  • 2
  • 14
17
votes
14 answers

Laravel: how to force HTTPS?

I'm starting to develop a new big app, and I'm using Laravel this time, and it's the first time. I need to force HTTPS for all pages, it's not important if from code or by .htaccess, but I'm not able to find a simple tutorial. The official docs…
realtebo
  • 23,922
  • 37
  • 112
  • 189
17
votes
4 answers

Validation rules required_if with other condition (Laravel 5.4)

I got a problem with validation rules with nested conditions. class StoreRequest extends Request { public function authorize(){ return true; } public function rules(){ return [ …
kesm0
  • 847
  • 1
  • 11
  • 20