Jump to: navigation, search

Move to core package

Introduction

This page is intended for sites that still use core as a submodule. You can tell if you are by the existence of an app/core directory in your application.

Contents


Composer.json

  • Remove all app/core lines from the autoload classmap.
  • Remove app/core from the psr-0 line.
  • Add the following to composer.json.
  1. "syntax/core": "dev-master",
  2. "syntax/chat": "dev-master",
  3. "syntax/forum": "dev-master"


  • Note: Chat and forum are optional. To use either of them, core is required.
    • A core version of 2.0.0 or higher is required for them.
  • Run composer update

Already have core

If you already have core and you wish to add another syntax package, you can use the following.

  1. composer require syntax/chat:dev-master
  2. composer require syntax/forum:dev-master


Database

  1. php artisan migrate:syntax


App config

  • Remove everything from the top of app.php up to the docblock for devmode.
  • Remove nonCoreAliases from the bottom.
  • The service providers after Intervention\Image should be the following.
  1. 'McCool\LaravelAutoPresenter\LaravelAutoPresenterServiceProvider',
  2. 'Syntax\Core\CoreServiceProvider',
  3. 'Syntax\Core\View\ViewServiceProvider',
  4. 'Syntax\Core\Control\CoreBugServiceProvider',
  5. 'Syntax\Core\Utility\UtilityServiceProvider',
  6. 'Syntax\Core\Utility\AliasServiceProvider',
  7. 'Syntax\Chat\ChatServiceProvider',
  8. 'Syntax\Forum\ForumServiceProvider',
  9. 'Syntax\Core\Forum\ForumServiceProvider',
  • ChatServiceProvider is only if you have the syntax/chat package.
  • Syntax\Forum\ForumServiceProvider and Syntax\Core\Forum\ForumServiceProvider are only if you have the syntax/forum package.

Artisan

  • Run the following
  1. php artisan config:publish syntax/core
  2. php artisan config:publish syntax/chat
  • syntax/chat config is only if you have the syntax/chat package.

Configs

  • Go through app/config/packagaes/syntax/core and update the config to suit your sites needs.
  • If you have syntax/chat, do the same for that config.

Start Global

  • Remove the last line from start global. (require app_path().'/core/views/core/helpers/customFormFields.php';)

Public

  • Add public/css/users directory.

Routes

The following routes can be used for each package.

Core

  1. Route::controller('admin', 'Core_AdminController');
  2. Route::controller('user' , 'Core_UserController');
  3. Route::controller('messages', 'Core_MessageController');
  4. Route::controller('github' , 'Core_GithubController');
  5. Route::controller('/', 'Core_HomeController');


Chat

  1. Route::controller('chat/admin', 'Core_Chat_AdminController');
  2. Route::controller('chat' , 'Core_ChatController');


Forums

  1. Route::controller('forum/moderation', 'Core_Forum_ModerationController');
  2. Route::controller('forum/admin', 'Core_Forum_AdminController');
  3. Route::controller('forum/post', 'Core_Forum_PostController');
  4. Route::controller('forum/board', 'Core_Forum_BoardController');
  5. Route::controller('forum/category', 'Core_Forum_CategoryController');
  6. Route::controller('forum', 'Core_ForumController');