Skip to content

Instantly share code, notes, and snippets.

@ttungbmt
Created January 1, 2016 05:35
Show Gist options
  • Select an option

  • Save ttungbmt/2f0d053083da117c0f73 to your computer and use it in GitHub Desktop.

Select an option

Save ttungbmt/2f0d053083da117c0f73 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": "ttungbmt@gmail.com"
}
],
"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');
}
}
@ttungbmt

ttungbmt commented Jan 1, 2016

Copy link
Copy Markdown
Author

First Commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment