From a3c8557663824b86fd51c1eda187f422ab604b5b Mon Sep 17 00:00:00 2001 From: shahghasiadil Date: Thu, 28 Apr 2022 22:29:49 +0430 Subject: [PATCH 1/4] key generate for laravel application --- .env.example | 52 ---------------------------------------------------- README.md | 21 ++++++++++++++++++++- 2 files changed, 20 insertions(+), 53 deletions(-) delete mode 100644 .env.example diff --git a/.env.example b/.env.example deleted file mode 100644 index 3594d2d..0000000 --- a/.env.example +++ /dev/null @@ -1,52 +0,0 @@ -APP_NAME=Laravel -APP_ENV=local -APP_KEY= -APP_DEBUG=true -APP_URL=http://localhost - -LOG_CHANNEL=stack -LOG_DEPRECATIONS_CHANNEL=null -LOG_LEVEL=debug - -DB_CONNECTION=mysql -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_DATABASE=laragigs -DB_USERNAME=root -DB_PASSWORD= - -BROADCAST_DRIVER=log -CACHE_DRIVER=file -FILESYSTEM_DISK=local -QUEUE_CONNECTION=sync -SESSION_DRIVER=file -SESSION_LIFETIME=120 - -MEMCACHED_HOST=127.0.0.1 - -REDIS_HOST=127.0.0.1 -REDIS_PASSWORD=null -REDIS_PORT=6379 - -MAIL_MAILER=smtp -MAIL_HOST=mailhog -MAIL_PORT=1025 -MAIL_USERNAME=null -MAIL_PASSWORD=null -MAIL_ENCRYPTION=null -MAIL_FROM_ADDRESS="hello@example.com" -MAIL_FROM_NAME="${APP_NAME}" - -AWS_ACCESS_KEY_ID= -AWS_SECRET_ACCESS_KEY= -AWS_DEFAULT_REGION=us-east-1 -AWS_BUCKET= -AWS_USE_PATH_STYLE_ENDPOINT=false - -PUSHER_APP_ID= -PUSHER_APP_KEY= -PUSHER_APP_SECRET= -PUSHER_APP_CLUSTER=mt1 - -MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" -MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/README.md b/README.md index 1efd9a5..7e524c6 100644 --- a/README.md +++ b/README.md @@ -7,30 +7,49 @@ An app for listing Laravel gigs/jobs. This project is from my YouTube "[Laravel ## Usage ### Database Setup + This app uses MySQL. To use something different, open up config/Database.php and change the default driver. To use MySQL, make sure you install it, setup a database and then add your db credentials(database, username and password) to the .env.example file and rename it to .env +### KeyGenerate + +To run laravel project generating keys are required make sure that you have .env +, run the following command +it will set APP_KEY=base64:xxxxxxxxxxxxxxxxxxxx to .env + +``` +php artisan key:generate +``` + ### Migrations + To create all the nessesary tables and columns, run the following + ``` php artisan migrate ``` ### Seeding The Databaase + To add the dummy listings with a single user, run the following + ``` php artisan db:seed ``` ### File Uploading + When uploading listing files, they go to "storage/app/public". Create a symlink with the following command to make them publicly accessible. + ``` php artisan storage:link ``` ### Running Then App -Upload the files to your document root, Valet folder or run + +Upload the files to your document root, Valet folder or run + ``` php artisan serve ``` From e608fc8f646410f4b64ab197949169e85aa52abe Mon Sep 17 00:00:00 2001 From: shahghasiadil Date: Thu, 28 Apr 2022 22:31:23 +0430 Subject: [PATCH 2/4] Readme.md updated with Generate key command --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e524c6..502e91b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This app uses MySQL. To use something different, open up config/Database.php and To use MySQL, make sure you install it, setup a database and then add your db credentials(database, username and password) to the .env.example file and rename it to .env -### KeyGenerate +### Generate Key To run laravel project generating keys are required make sure that you have .env , run the following command From 51ce9ae4cb018e9349804ee581a074a8e8b69049 Mon Sep 17 00:00:00 2001 From: shahghasiadil Date: Thu, 28 Apr 2022 22:39:35 +0430 Subject: [PATCH 3/4] migrate the database and seed with one command --- README.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 502e91b..866d5b2 100644 --- a/README.md +++ b/README.md @@ -22,20 +22,12 @@ it will set APP_KEY=base64:xxxxxxxxxxxxxxxxxxxx to .env php artisan key:generate ``` -### Migrations +### Migrations & Seeding The Databaase To create all the nessesary tables and columns, run the following ``` -php artisan migrate -``` - -### Seeding The Databaase - -To add the dummy listings with a single user, run the following - -``` -php artisan db:seed +php artisan migrate --seed ``` ### File Uploading From 2cf691966dbf6688fec15faf8428d511fa9c04de Mon Sep 17 00:00:00 2001 From: shahghasiadil Date: Thu, 28 Apr 2022 22:44:14 +0430 Subject: [PATCH 4/4] Migrations and seeding Information updated --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 866d5b2..b5470f3 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ it will set APP_KEY=base64:xxxxxxxxxxxxxxxxxxxx to .env php artisan key:generate ``` -### Migrations & Seeding The Databaase +### Migrations & Seeding The Database -To create all the nessesary tables and columns, run the following +To create all the nessesary tables, columns and add the dummy listings with a single user, run the following ``` php artisan migrate --seed