Skip to content

Latest commit

 

History

History
213 lines (139 loc) · 7.37 KB

README.md

File metadata and controls

213 lines (139 loc) · 7.37 KB

Laravel Logo

Build Status Total Downloads Latest Stable Version License

About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

Laravel is accessible, powerful, and provides tools required for large, robust applications.

Learning Laravel

Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

You may also try the Laravel Bootcamp, where you will be guided through building a modern Laravel application from scratch.

If you don't feel like reading, Laracasts can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Patreon page.

Premium Partners

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [email protected]. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.

Installazione Laravel

cd your parent_folder_path

composer create-project --prefer-dist laravel/laravel:^9.2 your_project_name_here

cd your_project_name_here

code . -r

php artisan serve

ctrl + c

Configurazione Laravel

# installo breeze che mi occorre per la dashboard
php artisan breeze:install

# installo pacificdev
composer require pacificdev/laravel_9_preset

php artisan preset:ui bootstrap

npm install

npm install --save @fortawesome/fontawesome-free

# installato il pacchetto ci ricopiamo i seguenti pezzi di codice in app.scss
$fa-font-path: "../webfonts" !default;

@import '~@fortawesome/fontawesome-free/scss/fontawesome';
@import '~@fortawesome/fontawesome-free/scss/fontawesome';
@import '~@fortawesome/fontawesome-free/scss/solid';
@import '~@fortawesome/fontawesome-free/scss/brands';

#in vite config aggiungo agli alias
'~@fortawesome': path.resolve(__dirname, 'node_modules/@fortawesome'),

#copio la cartella dei webfont e se voglio la rinomino

#installo dbal per migration e seeder
composer require doctrine/dbal


#comandi git

git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin your_git_url 
git push -u origin main

Clono progetto da github

# copio file .env.example e lo rinomino in .env

composer install

php artisan key:generate

npm install

# creo il database da phpmyadmin

# inserisco i dati per il collegamento al db in env

#creo migration es.
php artisan make:migration create_nome_tabella_table
php artisan make:migration update_users_table --table=users
php artisan make:migration add_phone_number_to_users_table

#lanciare migration
php artisan migrate

#revert migration
php artisan migrate:rollback

#creare il model (necessario per salvare dati su db con seeder)
php artisan make:model Nome

#popolare il db  es.
php artisan make:seeder UsersTableSeeder

php artisan db:seed --class=UsersTableSeeder

# preparo le rotte file web.php es. 
Route::get('/books', [BookController::class, 'index'])->name('books.index');

# creo controller
php artisan make:controller NomeController

# creo un controller di tipo risorsa 
php artisan make:controller --resource NomeController

# controllo le rotte
php artisan route:list --except-vendor  
### cosi controlliamo tutte le rotte eccetto vendor con l'attributo --except-vendor

# creare un modello Table che comprende  Migration/Seeder/Resources/Controller
php artisan make:model NomeModel -msrc

# poi bisogna creare la rotta di riferimento es.
Route::resource('NomeModel', NomeController::class);

# creo le views relative
## Creazione pagine
php artisan vendor:publish --tag=laravel-pagination

## Creazione error
php artisan vendor:publish --tag=laravel-errors

## Creazione traduzioni
php artisan lang:publish

## creazione file di validazione dello store
php artisan make:request StoreNome_ModelRequest

## creazione file di validazione dello update
php artisan make:request UpdateNome_ModelRequest
#In config/filestystems.php 
#Caricheremo i nostri file nella cartella storage/app/public
# modifichiamo quindi e volendo anche env file modifica chiave FILESYSTEM_DRIVER=public
'default' => env('FILESYSTEM_DRIVER', 'public'),
#lanciare comando
php artisan storage:link

#Eseguire questo comando per instrallare le dipendenze di Braintree
composer require braintree/braintree_php