Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Category Laravel

All about Laravel

Laravel is the best PHP framework for develop web application. Official Links Laravel Official Website Laravel Source Code – GitHub Laravel Documentation Video Tutorials Laracast

Class memcached not found error in Laravel

If you got bellow error when use memcached in Laravel, please check following steps. exception ‘SymfonyComponentDebugExceptionFatalErrorException’ with message ‘Class ‘Memcached’ not found’ in Install memcached $ sudo apt-get install php5-memcached memcached Enabled php5-memcached sudo php5enmod memcached Restart apache web…

Complex unique validation rule in Laravel

Laravel provides unique validation rule for check unique value on a given database table. Ref : Syntax unique:table,column,except,idColumn,whereColumn1,whereValue1,whereColumn2,whereValue2,… Ex1. Validate unique value in given database table ‘username’ => ‘unique:users,username’ Ex2. Validate unique value except given ID In mostly used…

Deploy Laravel to Production

Clone laravel source to server $ git clone Install necessary modules $ npm install$ composer install –no-dev -o –prefer-dist$ bower install Make .env $ cp .env.example .env Generate key to .env $ php artisan key:generate Execute gulp if necessary…

How to update timestamp in pivot table in Laravel

When insert a new row to pivot table, we can use attach() method like this: $company = Company::find(1);$company->users()->attach(1); But this will not update created_at and updated_at timestamps column in pivot table. To update timestamps, use withTimestamps() method on the relationship…