contains :-
introduction to the Routes
get Route
get route used to move between pages without sending any data(requests).post Route
post route must take a request that contains data from any form.parameter route
Route::get('users/{name}',function(string $name){ if($name == 'ahmed') return "admin: ".$name; else return 'user: '.$name; });inheritance
Blade System
contains :-
introduction to migrations
Migrations are like version control for your database, allowing your team to define and share the application's database schema definitionCreate migration
You may use the make:migration Artisan command to generate a database migration. The new migration will be placed in your database/migrations directory. Each migration filename contains a timestamp that allows Laravel to determine the order of the migrationsWrite in the terminal this command to make migration:
php artisan make:migration create_name_table
Migration Structure & Create Table
A migration class contains two methods: up and down. The up method is used to add new tables, columns, or indexes to your database, while the down method should reverse the operations performed by the up method.use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema;return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::create('flights', function (Blueprint $table) { $table->id(); $table->string('name'); $table->string('airline'); $table->timestamps(); }); }
/** * Reverse the migrations. */ public function down(): void { Schema::drop('flights'); }
};
Migration Commands
Running Migrations:php artisan migrateIf you would like to see which migrations have run thus far:
php artisan migrate:statusRolling Back Migration:
php artisan migrate:rollbackReset Migration:
php artisan migrate:resetRefresh Migration:
php artisan migrate:refreshFresh Migration:
php artisan migrate:fresh