shabaz-ejaz / laravel-cms
A Laravel 5 CMS with CRUD scaffolding and API.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^7.1.3
- barryvdh/laravel-cors: ^0.11.0
- barryvdh/laravel-ide-helper: ^2.4
- fideloper/proxy: ^4.0
- folklore/graphql: ^1.0
- grafite/cms: ^3.1
- guzzlehttp/guzzle: ^6.3
- kitetail/zttp: ^0.3.0
- laravel/cashier: ~7.0
- laravel/framework: 5.6.*
- laravel/passport: ^5.0
- laravel/tinker: ^1.0
- lavary/laravel-menu: ^1.7
- maatwebsite/excel: ^3.0
- phpoffice/phpspreadsheet: ^1.2
- rebing/graphql-laravel: ~1.7
- rutorika/sortable: ^4.2
- spatie/eloquent-sortable: ^3.4
- spatie/laravel-medialibrary: ^7.0.0
- tymon/jwt-auth: dev-develop
- yajra/laravel-datatables-oracle: ~8.0
Requires (Dev)
- barryvdh/laravel-debugbar: @dev
- filp/whoops: ^2.0
- fzaninotto/faker: ^1.4
- imanghafoori/laravel-anypass: ^1.0
- laracasts/generators: dev-master as 1.1.4
- mockery/mockery: ^1.0
- nunomaduro/collision: ^2.0
- phpunit/phpunit: ^7.0
This package is not auto-updated.
Last update: 2024-11-21 01:48:19 UTC
README
Laravel Grafite
This is a pre-packaged Laravel 5.6.* project which uses Grafite CMS
What does this project include?
- 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
Requirements
- Node 4.* or better
- PHP 7.1.3 or better
Installation
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
Database
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
Running
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
Admin Access
Login to Admin Panel by visiting: localhost:8000/login or if you've got a vhost set up then www.yoursite.com/login
CRUD Builder
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
Using GraphQL
Use this article as a guide for setting up and using GraphQL as an API service
Cache
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.
Running Tests
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}
Laravel Architecture
Contribution guidelines
- Writing tests
- Code review
- Other guidelines
Who do I talk to?
- Repo owner or admin
- Other community or team contact