Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create a new Laravel application
#!/bin/bash
laravel new $1
cd $1
composer install
yarn install
touch README.md
cp .env.example .env
git init
git add -A
git commit -m 'Initial commit'
php artisan key:generate
php artisan config:clear
php artisan config:cache
@connor11528

This comment has been minimized.

Copy link
Owner Author

@connor11528 connor11528 commented Jul 11, 2017

Save this file where you store your projects. Then run chmod command to make sure you have permissions to run it

chmod 700 create_laravel_app.sh 

Then you can create Laravel apps with the command below. Substitute APP_NAME for the title of your brand spankin new Laravel project

./create_laravel_app.sh APP_NAME

To add a sqlite database for rapid development run touch database/database.sqlite

For getting set up with MySQL check out: Build an online forum with Laravel — Initial Setup and Seeding (Part 1)

@connor11528

This comment has been minimized.

Copy link
Owner Author

@connor11528 connor11528 commented Sep 4, 2018

Create a MySQL database locally:

$ mysql -uroot -p 
$ create database YOUR_DATABASE_NAME;

Update the .env file:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=YOUR_DATABASE_NAME
DB_USERNAME=YOUR_USERNAME_HERE
DB_PASSWORD=YOUR_PASSWORD_HERE
@nifftyniche

This comment has been minimized.

Copy link

@nifftyniche nifftyniche commented Jan 22, 2019

hello does anyone know what I need to do to get my catagory deleted everytime i try and delete it it takes me to a page that says... Whoops, looks like something went wrong.
QueryException
SQLSTATE[42S02]: Base table or view not found:
with a red page listing a bunch of errors. I just dont have that much knowledge to know what I should do to fix it,
tpbradford07@gmail.com

@highman95

This comment has been minimized.

Copy link

@highman95 highman95 commented May 2, 2019

2 Things to do;

  • Cross-check your DB connections to ensure your app is pointing to the correct database
  • Ensure that the table or view is indicated as "not found" actually does exist. If not, create it.

This should be all you need to proceed.

@JoDeveloper

This comment has been minimized.

Copy link

@JoDeveloper JoDeveloper commented Oct 24, 2019

3 Things to do;

use pygithub to automatically create repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment