Retrieve data from database using Laravel
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAZsIFEO321kL4KCY6_F6UfHosN2meLaizTCEYdXiMurbyRPKOtjqlCTrP3mfLXdiAmS7SniZjnzCXygW_i5jnd5cipl0DVi_qC7yHBELlc9eG_vw36a8Xjb3dwvX9_NVuNnZWzJbrhEGn/w640-h360/Screenshot+%252874%2529.jpg)
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