Skip to content

AhmedAyman25/Learn-Laravel-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learn-Laravel-Framework

Lesson 1 ' Test ' :

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
  • extend()
  • yield()
  • section()
  • Blade System
  • The Blade is a powerful templating engine in a Laravel framework. The blade allows to use the templating engine easily, and it makes the syntax writing very simple. The blade templating engine provides its own structure such as conditional statements and loops
  • a templating engine to design a unique layout
  • Lesson 2 ' Migrations ' :

    contains :-

    introduction to migrations Migrations are like version control for your database, allowing your team to define and share the application's database schema definition
    Create 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 migrations
    Write 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 migrate 
    If you would like to see which migrations have run thus far:
     php artisan migrate:status 
    Rolling Back Migration:
     php artisan migrate:rollback 
    Reset Migration:
     php artisan migrate:reset 
    Refresh Migration:
     php artisan migrate:refresh  
    Fresh Migration:
     php artisan migrate:fresh 

    Releases

    No releases published

    Packages

    No packages published

    Languages