keithg

exculde or skip page from .htpasswd

AuthUserFile   “your file path” /.htpasswd AuthName “Accès protégé” AuthType Basic Require valid-user SetEnvIf Request_URI “^/yourpage ” allow Order allow,deny Require valid-user Allow from env=allow Deny from env=!allow Satisfy anyRead more …
cavinz

Laravel : Cache Database Queries

Laravel offers a simple mechanism for caching database queries, Example : If we want to cache the user’s table for an hour we have to write this $users = User::remember(60)->get(); that’s it now from this point to next 60 minutes query will not touch the database table User.Read more …
cavinz

Laravel : Easy Relationships with models

Let me give you an example of laravel relationships If User has many tasks and want to list in page Than in the task model define relation with user table and define tasks relationship in User model like below class Task extends Eloquent { public function user() { return $this->belongsTo(‘User’);...Read more …