Laravel CheatSheet

App key

php artisan key:generate

Migration: Create foreign key

$table->foreignIdFor(OtherClass::class);

Create full entity

php artisan make:model -mc MyNewModel

Base libraries

  1. spatie/laravel-query-builder
  2. rbdwllr/reallysimplejwt
  3. nannehuiges/jsend
  4. guzzlehttp/guzzle
  5. defuse/php-encryption
  6. cviebrock/eloquent-taggable
    php artisan vendor:publish --provider="Cviebrock\EloquentTaggable\ServiceProvider" --tag "config"
    php artisan vendor:publish --provider="Cviebrock\EloquentTaggable\ServiceProvider" --tag "migrations"
  7. npm i prettier @prettier/plugin-php
  8. barryvdh/laravel-ide-helper

Leave a Reply

Your email address will not be published.