monteecristoo’s blog

https://twitter.com/irakaarozo

tinker

jenssegers/laravel-mongodb Basic Usage on cloud9 with php7

// updated 2018/1/5 Installation monteecristoo.hatenablog.com monteecristoo.hatenablog.com Laravel Configuration @config\app.php add the service provider Jenssegers\Mongodb\MongodbServiceProvider::class, @config/database.php 'mongodb' => […

Laravel 5.4 Database Structure

Relationships model A: User protected $fillable = [ DBのカラム] public function messages) { return $this->hasMany(Message::class); } model B: Message protected $fillable = [ DBのカラム] foreign_key は登録しなくてOK public function users() …

Laravel tinker Basic Usage

// テスト用データベースを作成 php artisan make:model Test -m php artisan migrate (phpmyadmin-ctl install) tinkerを起動 php artisan tinker tinker console内で... $test = App\Test::create(); => App\Test {#715 updated_at: "2017-05-08 05:43:30"…