mirror of
https://github.com/10h30/Test-Laravel-Eloquent-Basics.git
synced 2026-06-05 15:07:45 +09:00
Complete Taks 1-2
This commit is contained in:
@@ -15,7 +15,7 @@ class UserController extends Controller
|
||||
// order by created_at desc
|
||||
// limit 3
|
||||
|
||||
$users = User::all(); // replace this with Eloquent statement
|
||||
$users = User::whereNotNull('email_verified_at')->orderBy('created_at', 'desc')->limit(3)->get();
|
||||
|
||||
return view('users.index', compact('users'));
|
||||
}
|
||||
|
||||
@@ -10,4 +10,6 @@ class Morningnews extends Model
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = ['title', 'news_text'];
|
||||
|
||||
protected $table = 'morning_news';
|
||||
}
|
||||
|
||||
Generated
+1460
-1153
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user