Answers for "php make model with migration"

PHP
1

make migration with model

php artisan make:model -m <Model name>
Posted by: Guest on January-15-2021
3

laravel soft delete

/** in migrations this changes need to
    add for table we want to add soft delete (LARAVEL)*/

	/** The migrations. START */
	public function up()
	{
		Schema::table('users', function(Blueprint $table)
		{
			$table->softDeletes();
		});
	}
	/** The migrations. END */

	/** after adding softdelete you need to
    point that column in table related model (LARAVEL)*/

	/** The Model. START */
  	use Illuminate\Database\Eloquent\SoftDeletes;
  	class User extends Model {
	  use SoftDeletes;
	  protected $dates = ['deleted_at'];
	}
	/** The Model. END */
Posted by: Guest on November-17-2020
2

artisan make migration with model

php artisan make:Model Status -m
Posted by: Guest on November-06-2020
2

php artisan make :migration with model

php artisan make:model ModelName -a
Posted by: Guest on December-28-2020
1

laravel make model with migration 5.8

php artisan make:model Settings --migration
Posted by: Guest on December-09-2020

Code answers related to "php make model with migration"

Browse Popular Code Answers by Language