by Octobro
OctoberCMS is a powerful CMS based on Laravel PHP Framework.
-
Clone to your base project directory.
git clone https://github.com/octobroid/oc-boilerplate.git <project-name>
-
Don't forget to remove
.git
folder, create your own repository.rm -rf !$/.git
-
Install composer dependencies.
composer install
-
Create configuration file
.env
(copy from.env.example
) and set the database configuration.DB_HOST=localhost DB_DATABASE=<database-name> DB_USERNAME=<database-user> DB_PASSWORD=<database-password>
-
Migrate October database.
php artisan october:up
-
Install frontend library using Yarn. Go to theme directory first.
cd themes/my-theme yarn install
-
For security reason, please generate new application key.
php artisan key:generate
-
Create your own plugin
php artisan create:plugin Foo.Bar
-
In your Foo.Bar
Plugin.php
file, add code bellow to configure lighthouse configruration
class Plugin extends PluginBase
{
public function boot()
{
App::register('Nuwave\Lighthouse\LighthouseServiceProvider');
App::register('MLL\GraphQLPlayground\GraphQLPlaygroundServiceProvider');
}
}
- Publish your lighthouse configuration with command
php artisan vendor:publish
and register the lighthouse configuration inconfig/lighthouse
with following code. You can findschema.graphql
inPlugins/Foo/Barr/Graphql/Schema.graphql
'schema' => [
'register' => base_path('plugins/foo/bar/graphql/schema.graphql'),
],
- Open url
{{your_domain}}/graphql-playground
you can find schema configuration on this panel.
In this boilerplate, we've installed:
- RainLab.User
- RainLab.Pages
- RainLab.Sitemap
- RainLab.GoogleAnalytics
- October.Drivers
- Bedard.Debugbar
- Mja.Mail
- Jacob.Horizon
More plugins that we recommend (not installed yet):
To install plugin, run the command:
php artisan plugin:install <plugin-name>
To enable Laravel Horizon, run the command:
php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"
All frontend libraries are managed using bower. These packages are installed by default:
To install additional library, run the command:
yarn add <package-name>
Please follow the following guide: