Skip to content

Instantly share code, notes, and snippets.

@ermand
Last active July 11, 2025 14:24
Show Gist options
  • Save ermand/a4cab38a90f8eca630a5ecd0a261b656 to your computer and use it in GitHub Desktop.
Save ermand/a4cab38a90f8eca630a5ecd0a261b656 to your computer and use it in GitHub Desktop.

Laravel commands

1. Bej run projektin lokalisht

Install dependencies

composer install

Install npm dependencies

npm install

Run the project locally

composer run dev

OR

php artisan serve
npm run dev

Shembull: http://127.0.0.1:8000

2. Krijo CRUD per entity-n

Krijo modelin dhe migration-in per entity-n

php artisan make:model Permission -m

Shembull: Permission.php and 2025_07_11_000000_create_permissions_table.php

Krijo controller me metodat

php artisan make:controller PermissionController --resource

Shembull: PermissionController.php

Krijo request object per te vendosur validimet qe duam te kemi

php artisan make:request PermissionRequest

Shembull: PermissionRequest.php

Shto routes tek web.php

Route::resource('permissions', PermissionController::class);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment