1$flight = Flight::findOrFail(1);
2
3$flight = Flight::where('legs', '>', 3)->firstOrFail();
1/** in migrations this changes need to
2 add for table we want to add soft delete (LARAVEL)*/
3
4 /** The migrations. START */
5 public function up()
6 {
7 Schema::table('users', function(Blueprint $table)
8 {
9 $table->softDeletes();
10 });
11 }
12 /** The migrations. END */
13
14 /** after adding softdelete you need to
15 point that column in table related model (LARAVEL)*/
16
17 /** The Model. START */
18 use Illuminate\Database\Eloquent\SoftDeletes;
19 class User extends Model {
20 use SoftDeletes;
21 protected $dates = ['deleted_at'];
22 }
23 /** The Model. END */