Laravel: Router Methods
Route::get($uri, $callback); Route::post($uri, $callback); Route::put($uri, $callback); Route::patch($uri, $callback); Route::delete($uri, $callback); Route::options($uri, $callback);
Route::get($uri, $callback); Route::post($uri, $callback); Route::put($uri, $callback); Route::patch($uri, $callback); Route::delete($uri, $callback); Route::options($uri, $callback);
Some of the data retrieval or processing tasks performed by an application could be CPU intensive or take several seconds to complete. When this is the case, it is common to cache the retrieved data for a time so it can be retrieved quickly on subsequent requests for the same data. The cached data is…
The API for Routing in Laravel can be found here: https://laravel.com/api/8.x/Illuminate/Routing.html Common Methods whereAlpha(array|string $parameters) whereAlphaNumeric(array|string $parameters) whereNumber(array|string $parameters) whereUuid(array|string $parameters)
Laravel Helpers are a variety of global “helper” PHP functions. The full list of helpers can be found here: https://laravel.com/docs/8.x/helpers Miscellaneous Helpers abort() The abort function throws an HTTP exception which will be rendered by the exception handler. The example below shows a 400 error. if(! file_exists($myFile)){ abort(400);} dd() The dd function stands for…
Create a Project Make sure you are in the directory where you will create the project folder. If using XAMPP, change directory to htdocs. or Run the Server Create a new middleware
MVC Design Pattern Model (Eloquent) A models allows to view, insert, update, and delete records from a database table. Laravel includes Eloquent, an object-relational mapper (ORM) to interact with a database. When using Eloquent, each database table has a corresponding “Model” that is used to interact with that table. View The view is what the…