Laravel Helpers: Miscellaneous

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…

Laravel: MVC Design Pattern

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…