- https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes
- https://www.reddit.com/r/laravel/comments/3to60i/50_laravel_tricks/
- 1. Automatic Model Validation
Working on a project for a client, we have decided instead of using the traditional IDX and restricting us into a box, go with RETS.
To read more on the differences between IDX and RETS feel free to view it here
Now on to the code!!
Assuming you have laravel installed already, we need one other dependancy added.
https://github.com/troydavisson/PHRETS
In your event function of EventsController add \Request $request as the last parameter. This way you can grab all data for that given session.
Example URL: HTTP://siteurl.com/event/cameo?code={yourCode}
public event(\Request $request) {
// Grab code
if (isset($request->code)) {
To begin, copy the below command. Make sure to replace curly bracket values with your proper project names.
$ composer create-project laravel/laravel --prefer-dist {projectName}
&& cd {projectName}
&& sudo chown -R andreas:www-data .
&& composer require sapioweb/crudhelper
&& composer require spatie/laravel-tail
Create a folder /packages in our root, and we will put our package there. Every package has a name, which consists of two parts; vendor or creator/package name.
Example Laravel itself has a full name of laravel/laravel. Let’s call our package sapioweb/larets
Now we create a folder inside our /packages:
/package