Questions tagged [laravel-5]

Laravel 5 is a version of Laravel released between 2015 and 2020. Laravel is a an open-source PHP web development MVC framework created by Taylor Otwell which helps you create applications using simple, expressive syntax. Use the laravel tag for general Laravel related questions.

Laravel 5.0 was released on 4th February 2015, and Laravel 5.8 in 2019. Both Laravel 5.8 and Laravel 5.5 LTS received their last security patch in 2020.

Laravel 5 uses the latest components and techniques of Design patterns and 's components. Laravel uses Composer for managing dependencies. Laravel has its own optional templating engine called Blade.

Make sure you have the following minimum PHP version for each Laravel version.

5.0 requires >= 5.4

5.1 and 5.2 requires >= 5.5.9

5.3 and 5.4 requires >= 5.6.4

5.5 requires >= 7.0.0

5.6, 5.7, and 5.8 requires >= 7.1.3

Laravel Versions

5.8 - Changelog

5.7 - Changelog

5.6 - Changelog

5.5 LTS - Changelog

5.4 - Changelog

5.3 - Changelog

5.2 - Changelog

5.1 LTS - Changelog

5.0 - Changelog

Useful documentation

Pros

  1. It uses a blade template that is fast and maintains a cache
  2. Expressive syntax
  3. Reusability of code
  4. Laravel 5.5 is the latest LTS release; Laravel 5.1 was the first LTS release

Useful Tags

Other resources

43708 questions
160
votes
20 answers

Laravel 5 – Clear Cache in Shared Hosting Server

The question is pretty clear. php artisan cache:clear Is there any workaround to clear the cache like the above command but without using CLI. I am using a popular shared hosting service, but as per my plan, I don't have control panel access. I…
Duke
  • 35,420
  • 13
  • 53
  • 70
156
votes
18 answers

Trying to get Laravel 5 email to work

I'm trying to send an email to a specified user by typing in the URL, but I'm getting the following error: Swift_TransportException in AbstractSmtpTransport.php line 383: Expected response code 250 but got code "530", with message "530 5.7.1 …
Vantheman6
  • 1,719
  • 3
  • 13
  • 13
155
votes
15 answers

Laravel : Syntax error or access violation: 1055 Error

I want to use WhereIn and Groupby in the same query to fetch Result. I've tried this: $loadids=explode("#@*",$reciptdet->loading_id); $loadingdatas=DB::table('loading')->groupBy('vehicle_no')->whereIn('id',$loadids)->get(); But I got this error…
Karthikvijayaveni
  • 1,864
  • 3
  • 13
  • 15
150
votes
27 answers

Laravel Migrate Specific File(s) from Migrations

Hi read all the included documentation here in https://laravel.com/docs/5.4/migrations. Is there a way on how to migrate a certain migration file (1 migration only), cause right now every time there is a change I use php artisan migrate:refresh and…
Martney Acha
  • 2,802
  • 4
  • 33
  • 48
150
votes
14 answers

laravel 5.3 new Auth::routes()

Recently I start to use laravel 5.3 to write a blog, but I have a question after run php artisan make:auth when I run this, it will generate routes in my web.php this is the code in it: Auth::routes(); Route::get('/home',…
g1eny0ung
  • 1,761
  • 3
  • 14
  • 17
149
votes
9 answers

how to test specific test class using phpunit in laravel

I want to test specific testClass in my project since there are a lot of test class that's failure and I just want to test one Class at a time. I've created the test Class in following folder \test\repositories\ApplicationVersionFormat.php :…
Gujarat Santana
  • 9,854
  • 17
  • 53
  • 75
145
votes
16 answers

How to pass data to all views in Laravel 5?

I want to have some default data accessible in all views in my Laravel 5 application. I have tried to search for it but only find results for Laravel 4. I have read the documentation 'Sharing Data With All Views' here but I can't understand what to…
Ragnarsson
  • 1,736
  • 2
  • 11
  • 16
145
votes
23 answers

Laravel 5 - redirect to HTTPS

Working on my first Laravel 5 project and not sure where or how to place logic to force HTTPS on my app. The clincher here is that there are many domains pointing to the app and only two out of three use SSL (the third is a fallback domain, long…
NightMICU
  • 9,000
  • 30
  • 89
  • 121
134
votes
4 answers

Why do I have to run "composer dump-autoload" command to make migrations work in laravel?

I have built some migration classes in my application to create the tables I need, but I keep getting errors. I need to run this command: composer dump-autoload Only then it works again as expected. Am I doing something wrong that generates this…
Hasan Al-Natour
  • 1,936
  • 2
  • 14
  • 22
131
votes
27 answers

Laravel 5 show ErrorException file_put_contents failed to open stream: No such file or directory

I have a project on Laravel 5 and I work with it at the office and at home too. It works fine, but recently at home it stopped working. Laravel show me two…
Evgeniy
  • 3,219
  • 5
  • 25
  • 40
129
votes
4 answers

How to compare two Carbon Timestamps?

I have two timestamps, edited_at which I created and created_at (Laravel's)... In database, both have type timestamp and default value 0000-00-00 00:00:00... But var_dump(edited_at variable) is giving string. While var_dump(created_at variable) is…
Hassan Saqib
  • 2,597
  • 7
  • 28
  • 51
124
votes
9 answers

The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. laravel 5.3

I installed a new fresh copy of Laravel 5.3 using composer but I'm getting this error: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. Even though my app.php file in config directory specify 'cipher' =>…
Emmanuel Mariki
  • 1,379
  • 3
  • 12
  • 19
124
votes
14 answers

laravel 5 : Class 'input' not found

In my routes.php file I have : Route::get('/', function () { return view('login'); }); Route::get('/index', function(){ return view('index'); }); Route::get('/register', function(){ return…
Gammer
  • 5,453
  • 20
  • 78
  • 121
114
votes
16 answers

There is no existing directory at /storage/logs and its not buildable: Permission denied

I have a problem with my Laravel deployment on a OVH web server. After made composer update php artisan cache:clear php artisan route:clear php artisan dump-autoload I have this answer: There is no existing directory at /storage/logs and its…
Timothée
  • 1,229
  • 3
  • 9
  • 6
113
votes
13 answers

Laravel Middleware return variable to controller

I am carrying out a permissions check on a user to determine whether they can view a page or not. This involves passing the request through some middleware first. The problem I have is I am duplicating the same database query in the middleware and…
Alex
  • 2,003
  • 4
  • 19
  • 30