This is a pre-packaged Laravel 5.6.* project which uses Grafite CMS
- Laravel Framework 5.6.*
- Grafite CMS
- Grafite Builder for CRUD Scaffolding
- GraphQL
- Datatables
- Laravel-Excel
- Laravel Media Library
- Laravel Passport API Authentication
- Laravel Cashier for Stripe Billing
- Node 4.* or better
- PHP 7.1.3 or better
Start by installing dependencies:
composer install
npm install
Publish the assets:
php artisan vendor:publish
Generate an app key:
php artisan key:generate
Create a symbolic link from the public disk directory (this is required for images stored in public):
php artisan storage:link
Configure a database:
Open the .env
file in the root of the project and configure a database connection.
If the .env
file does not exist then clone the .env.example
file and rename it to .env
.
Run migrations:
php artisan migrate
Seed the database:
php artisan db:seed
Set up Laravel Passport for api authentication:
php artisan passport:install
There should be a default admin account for you with the following credentials:
- Username: admin@example.org or admin@example.com
- Password: admin
Once dependencies are installed, run with:
php artisan serve
This will open up a Laravel development server at localhost:8000
If you want to open multiple Laravel dev servers you can specify the port like this:
php artisan serve --port=6060
Login to Admin Panel by visiting: localhost:8000/login or if you've got a vhost set up then www.yoursite.com/login
To use the CRUD builder you need to run the following command:
php artisan crudmaker:new Post --api --ui=bootstrap --migration --schema="id:increments,name:string,author:string" --relationships="belongsToMany|\App\Models\Tag|tags"
You can use the following options for the above command:
php artisan crudmaker:new ModelName
{--api} # if you want to generate REST api routes, controllers and middleware
{--ui=bootstrap|semantic} # css style
{--serviceOnly} # if you only want service classes generated
{--withFacade} # fuck knows
{--withoutViews} # don't generate view files
{--migration} # generate a migration script
{--schema} # specify the schema data i.e. db columns
{--relationships} # generate relationships
You can view the full documentation for this here
Use this article as a guide for setting up and using GraphQL as an API service
Laravel configuration and app settings are cached in memory by default. You would near to clear the cache if you have made changes to the config files, expecially the .env
file. To clear the cache you can run the following commands:
Clear config cache:
php artisan config:clear
Clear general cache:
php artisan cache:clear
Clear config cache and generate new cache file:
php artisan config:cache
If you are using php artisan serve
to run your application then you'll need to restart it if you've made changes in any of the cached config files.
Run all tests:
.\vendor\bin\phpunit
Run all tests from one class
.\vendor\bin\phpunit --filter MyTestClass
Run single test method
.\vendor\bin\phpunit tests/Feature/{testfilename}
.\vendor\bin\phpunit tests/Unit/{testfilename}
- Writing tests
- Code review
- Other guidelines
- Repo owner or admin
- Other community or team contact