10 months ago


Laravel use Event; class

Laravel use Event; class CreateStudentController extends Controller { public function insertform(){ return view('stud_add'); } public function insert(Request $request){ $name = $request->input('stud_name'); DB::insert('insert into student (name) values(?)',[$name]); echo "Record inserted successfully."; echo 'Click Here to go back.'; //firing an event Event::fire(new StudentAdded($name)); } } Step 4: Create an event called StudentAdded by executing the following command. php artisan make:event StudentAdded Step 5: After successful execution, you will receive the following output: 116

Laravel Step 6: The above command will create an event file at App\Events\StudentAdded.php. Copy the following code in that file. App\Events\StudentAdded.php

Laravel Starter - PHP User Group (Myanmar)
090-056 Exam BrainDumps are Out - Download and Prepare
WSDL 1.1 Overview
WSDL 1.1 Overview
CPA Latest Exam BrainDumps
Download C# Tutorial (PDF Version) - Tutorials Point
Building an API with Slim 3
Visual Basic 2008 Recipes - Online Public Access Catalog
Business Visibility with Web Services
HP StorageWorks X9000 Network Storage System