Skip to content

Instantly share code, notes, and snippets.

@ttungbmt
Last active October 26, 2016 23:52
Show Gist options
  • Save ttungbmt/fe3849bc32013eda95dc to your computer and use it in GitHub Desktop.
Save ttungbmt/fe3849bc32013eda95dc to your computer and use it in GitHub Desktop.
Laravel CMS
{
"name": "ttungbmt/cms",
"description": "CMS - Awesome site",
"type": "cms",
"require": {
},
"license": "MIT",
"authors": [
{
"name": "Truong Thanh Tung",
"email": "[email protected]"
}
],
"minimum-stability": "dev"
}
<?php
Route::get('test', function(){
dd(01);
});
<?php
/**
* Created by PhpStorm.
* User: ttungbmt
* Date: 1/1/2016
* Time: 11:52 AM
*/
namespace ThanhTung\CMS\App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class CMSRouteServiceProvider extends ServiceProvider
{
protected $namespace = 'ThanhTung\CMS\App\Http\Controllers';
/**
* Define your route model bindings, pattern filters, etc.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function boot(Router $router)
{
//
parent::boot($router);
}
/**
* Define the routes for the application.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function map(Router $router)
{
$router->group(['namespace' => $this->namespace], function ($router) {
require __DIR__.'/../Http/routes.php';
});
}
}
<?php
namespace ThanhTung\CMS\App\Providers;
use Illuminate\Support\ServiceProvider;
class CMSServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
}
/**
* Register the application services.
*
* @return void
*/
public function register()
{
$this->registerServices();
$this->registerProviders();
}
protected function registerServices()
{
}
protected function registerProviders()
{
$this->app->register('ThanhTung\CMS\App\Providers\CMSRouteServiceProvider');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment