Laravel Migration Command

entry image
*** php artisan config:cache 
Other artisan commands
*** Migration
  php artisan migrate
  Rollback recent migration
    php artisan migrate:rollback
  * issue class not found
      composer dump-auto
   * Renaming migration classe
      Had problems when 2 migrations have differnt filename but same class 
        eg 2019_add_columns.php and 2018_add_columns.php 
          with classes AddColumns
         Instead write migration as 
          2019_add_columns_2019.php with class name AddColumns2019
          2018_add_columns_2018.php with class name AddColumns2018
*** Messagebag Object, used in validation errors;
class Illuminate\Support\MessageBag
	$obj->add($key, $message) 
		 //insert key later, maybe custom validation $key
		//not array like syntax to set $obj[ $key ] 

# Model
create/save will affect database
``` php
$trainee = Trainee::create(); //Maybe laravel create in db, with id; created_at, updated_at   
$trainee = new Trainee; //This wont fill id from database

### To display all errors at once
    {!! implode('', $errors->all('
')) !!}

### To display error under each field.
{{ $message }}

//< ?php

// *** Files
// *Check 644 and 755 for file permissions
// *Using public path in storage
$img_path=public_path('upload/users/'.$user_id. '/' .$filename);

//Check file exists php method
if( is_file($img_path) ){ //true if file exits
    // or File::delete($img_path); //laravel delete
    echo "File does not exist";