How-to articles, tricks, and solutions about LARAVEL
create folder in laravel
In Laravel, you can create a new folder using the File facade's makeDirectory method.
Displaying the Error Messages in Laravel after being Redirected from controller
In Laravel, you can use the withErrors method to pass error messages to a view after a redirect.
Doing HTTP requests FROM Laravel to an external API
To make an HTTP request from Laravel to an external API, you can use the HTTP client of your choice.
Get environment value in controller
To get an environment value in a PHP controller, you can use the getenv function.
Get only specific attributes with from Laravel Collection
To get specific attributes from a Laravel Collection, you can use the pluck method.
How do I write to the console from a Laravel Controller?
You can use the Log facade to write to the console from a Laravel controller.
How to alias a table in Laravel Eloquent queries (or using Query Builder)?
To alias a table in a Laravel Eloquent query, you can use the as method on a DB facade.