Laravel 5.5 LTS: A Feature Packed Framework
After Laravel 5.1, 5.5 is known to be the next LTS (Long Term Support) version of Laravel which was released this year at the end of August. For now, it is the most stable version of Laravel framework. This release version is packed with new features which will cut down the load from your hired Laravel development company as it provides simple and fast routing, real-time event broadcasting and session storage.
To know more, carry down yourself to check out the beneficial features of Laravel 5.5 LTS.
Now you can easily create a separate factory files for every single model. Before, there was only a single file named ModelFactory.php. When you will create a new model through artisan command, then only a factory file will be created.
//Create model with factory
$ php artisan make:model -fm Model
//Create individual factory for specific model
$ php artisan make:factory --model=Model ExampleFactory
Check out the Major Advantages: Laravel over other PHP Frameworks
Now, if the Exception is classifying a public “response” method after that it can be rendered. Previously, conditionally sends back a response which was based on the exception type while checking App\Exception\Handler:: render(). But now in Laravel 5.5, you only have to drop the exception, you will be responded automatically to your handler. In your Exception classes, you can even apply a responsible interface.
namespace App\Exceptions;
class StudentException extends \Exception
public function __construct(Student $student)
$this->student = $student;
public function render($request)
return response("The student '{$this->student->name}' and '{$this->student->enrollment}' selection.");
In the old versions of Laravel, you were using request instance through $this->validate() method under the controller but in Laravel 5.5, you can directly just call validate on the request object.
$data = request()->validate([After Laravel 5.1, 5.5 is known to be the next LTS (Long Term Support) version of Laravel which was released this year at the end of August. For now, it is the most stable version of Laravel framework. This release version is packed with new features which will cut down the load from your hired Laravel development company as it provides simple and fast routing, real-time event broadcasting and session storage.
Split Factory Files
Now you can easily create a separate factory files for every single model. Before, there was only a single file named ModelFactory.php. When you will create a new model through artisan command, then only a factory file will be created.
//Create model with factory
$ php artisan make:model -fm Model
//Create individual factory for specific model
$ php artisan make:factory --model=Model ExampleFactory
Exception Render
Now, if the Exception is classifying a public “response” method after that it can be rendered. Previously, conditionally sends back a response which was based on the exception type while checking App\Exception\Handler:: render(). But now in Laravel 5.5, you only have to drop the exception, you will be responded automatically to your handler. In your Exception classes, you can even apply a responsible interface.
namespace App\Exceptions;
use App\Student;
class StudentException extends \Exception
{
protected $student;
public function __construct(Student $student)
{
$this->student = $student;
}
public function render($request)
{
return response("The student '{$this->student->name}' and '{$this->student->enrollment}' selection.");
}
}
Request Validation
In the old versions of Laravel, you were using request instance through $this->validate() method under the controller but in Laravel 5.5, you can directly just call validate on the request object.
$data = request()->validate([
'name' => 'required',
'enrollment' => 'required|numeric',
'joining_date' => 'required|date_format:Y-m-d',
'result' => 'boolean',
]);
However, there are many other new features in Laravel 5.5 LTS version but mentioned above are most crucial ones which help your hired Laravel development company to work on web development application without facing many issues.
'enrollment' => 'required|numeric',
'joining_date' => 'required|date_format:Y-m-d',
However, there are many other new features in Laravel 5.5 LTS version but mentioned above are most crucial ones which help your hired Laravel development company to work on web development application without facing many issues.