Retrieve data from database using Laravel
Step 1: Install Laravel 5.7 Project
In the first step, we will install Laravel 7 application using bellow command, So open your terminal OR command prompt and run bellow command:
composer create-project --prefer-dist laravel/laravel blog
Step 1: Database connection
Step 1: route
// ------------------------ form ------------------------ //
Route::get('viewStudent', 'StudentController@viewStudent')->name('viewStudent');
Route::post('/insertStudent', 'StudentController@insertStudent');
Route::get('reportStudent', 'StudentController@reportStudent')->name('reportStudent'); Step : StudentController.php/useUpdate
public function reportStudent() { $user = Auth::user(); $reportStudent = DB::table('students') ->get(); return view('report.report_student',compact('user',$user,'reportStudent')); } public function reportStudent() { $user = Auth::user(); $reportStudent = DB::table('students') ->get(); return view('report.report_student',compact('user',$user,'reportStudent')); }Step 2: password/user
View/report/student_report.blade.php
0 Comments
CAN FEEDBACK
Emoji