mhafizhasan
10/12/2018 - 3:02 AM

Laravel

Laravel Jumpstart

  • install dependencies after pull from git composer install

  • generate larvel key php artisan key:generate

  • generate jwt key php artisan jwt:secret

  • update package autoload map
    composer dump-autoload

Tinker

Menteri::get()

faker 1.8 - ms_MY - ada faker data Malaysia

Eloquent

belongsToMany

belongsToMany(1,2,3,4)  

1. The other model that you want to link to
2. The name of the table that joins these records
3. The name of the field in the joining table that references the current model
4. The name of the field in the joining tables that references the foreign model