# Already done # /bin/bash -c "$(curl -fsSL https://php.new/install/linux/8.4)" # apt-get install npm composer create-project laravel/laravel myapp cd myapp # now edit .env # change DB_CONNECTION=mysql and the following lines vi .env # Breeze is a minimal, simple implementation of all of Laravel's authentication features, # including login, registration, password reset, email verification, and password confirmation. # Choose react with inertia composer require laravel/breeze --dev php artisan breeze:install # prepare git environment git init git add . git commit -m "Initial Laravel setup with Breeze" # install filament MDA component and DB drivers composer require filament/filament:"^3.3" -W composer require doctrine/dbal --dev php artisan filament:install --panels # create an entity php artisan make:model Book -m # edit database/migrations/2025_11_20_132617_create_books_table.php to add fields # add authors, title, ISBN, number of pages, price # $table->string('authors', 256); # $table->string('title', 256); # $table->string('isbn', 32); # $table->integer('numPages'); # $table->float('price'); # $table->unique('isbn'); # update the database with new entity information php artisan migrate php artisan make:filament-resource Book --generate php artisan serve --host=0.0.0.0 --port=10081 # visit http://hydra-6.dit.uop.gr:10081/login # stop server # populate users php artisan make:seed UserSeeder # edit database/seeders/UserSeeder.php # #add import # use App\Models\User; # add the following in run method: # # $user = User::create([ # 'name' => 'admin', # 'email' => 'YourEmail@go.uop.gr', # 'password' => bcrypt('soft-eng') # ]); # # Now perform population php artisan db:seed --class=UserSeeder # Try to fill in a book --> KABOOM! # edit app/Models/Book.php # add protected $fillable = ['authors', 'title', 'isbn', 'numPages', 'price']; # Add relationships, e.g. "lending --> book" # edit app/Models/Lending.php # Add # public function lendedBook() { return $this->belongsTo(Book::class, 'id'); } # Generate API composer require mrmarchone/laravel-auto-crud --dev php artisan vendor:publish --provider="Mrmarchone\LaravelAutoCrud\LaravelAutoCrudServiceProvider" php artisan auto-crud:generate --model=Book --overwrite --type=api --repository --pattern=spatie-data --curl --postman # view routes/api.php # view laravel-auto-crud/curl.txt # view laravel-auto-crud/postman.json