Laravel quickstart gist using craftable and existing database schema

Laravel quickstart gist using craftable and existing database schema to generate models, etc from existing database schema.


cd ~/git
brew install nmp
brew install nodejs
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

composer create-project --prefer-dist laravel/laravel exampletest "5.5.*"
cd exampletest
composer require --dev "xethron/migrations-generator"
copy in .env file
php artisan migrate:generate



vim app/Providers/AppServiceProvider.php
#add:

Schema::defaultStringLength(191);
use Illuminate\Support\Facades\Schema;


composer require brackets/craftable
composer require --dev brackets/admin-generator
    
#(delete the 3 craftabel migration files from database/migrate (they get replaced))

php artisan craftable:install

#(copy admin password)
npm install
npm run dev


composer require reliese/laravel --dev
# add line to config/app.php
vim config/app.php

providers [
    Reliese\Coders\CodersServiceProvider::class,
]

php artisan vendor:publish --tag=reliese-models
php artisan config:clear
# change config/models.php
vim config/models.php
php artisan code:models
#in commandline do:
  for i in $(ls -1 app/TempModels | sed -e 's/\.php$//'); do 
        php artisan admin:generate $i
  done;
#press enter a ton of times

npm run dev

#add to staging server
#git clone in server
#copy in env
composer install
chown -R apache:apache storage

#goto sitename/admin
#[20 mins to here]
#[a few hours to add the fields fromt he TempModels sections]
# install some things that we use, eg guzzle?

composer require guzzlehttp/guzzle