Laravel - Working With Database
Laravel has made handling with database simple. Laravel presently bolsters following 4 databases −
- SQL Server
Connecting to Database
Configure the database in config/database.php record and make the school database with structure in MySQL as appeared in the accompanying table.
|Column Name||Column Datatype||Extra|
|Id||int(11)||Primary key | Auto increment|
We will perceive how to include, erase, refresh and recover records from database utilizing Laravel in understudy table.
|Sr.No.||Records & Description|
We can embed the record utilizing the DB exterior with supplement method.
After arranging the database, we can recover the records utilizing the DB veneer with select method.
We can refresh the records utilizing the DB exterior with refresh method.
We can erase the record utilizing the DB exterior with the erase method.