Use –create option when create migration

To create migration, we can use this artisan command.

Laravel will create a new migration file in database/migrations directory. Generated file is like this:

up() method is used to create a new...


How to update timestamp in pivot table in Laravel

When insert a new row to pivot table, we can use attach() method like this:

But this will not update created_at and updated_at timestamps column in pivot table. To update timestamps, use withTimestamps()...

Automated Deploy with Jekyll, Gulp, Travis CI and GitHub Pages 0

Automated Deploy with Jekyll, Gulp, Travis CI and GitHub Pages

1. Make .travis.yml file to root

2. Generate Personal access tokens from GitHub website Click settings menu Click Personal access tokens menu Click Generate new token button Input Token description like travis Check...


Troubleshooting after update to Homestead 0.5.0

Error 1 Maximum call stack size exceeded error Solution Update npm using sudo npm i npm -g command. Error 2 ENOENT: no such file or directory, scandir ‘/home/vagrant/app-name/node_modules/node-sass/vendor’ error Solution Execute npm rebuild node-sass...


Some Tips when using Entrust in Laravel

I got the problem when using bican/roles Role module in my Laravel project. There is an error when I check permission. So I decided to move zizaco/entrust and tested all features working normal. How...


Class memcached not found error in Laravel

If you got bellow error when use memcached in Laravel, please check following steps.

Install memcached

Enabled php5-memcached

Restart apache web server

Check memcached service status

Clear cache...


How to disable xdebug

When I run composer update command in shell, composer displays warning like bellow.

And takes too long time to process. I already go to https://getcomposer.org/xdebug reference and tried to disable xdebug option in...


Deploy Laravel to Production

Clone laravel source to server

Install necessary modules

Make .env

Generate key to .env

Execute gulp if necessary

Migrate database

Give owner to web server

Set write...

What is FreeTDS 0

What is FreeTDS

FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase datbases. Main Website Github Repository

How to vertical align of Facebook button with others 0

How to vertical align of Facebook button with others

When I attach social buttons to my blog, Facebook button moves bottom almost 5 pixels from other social buttons like Twitter, Google+. This is because facebook button has vertical-align: bottom; style inside of widget;...