Last active
October 26, 2016 23:52
-
-
Save ttungbmt/fe3849bc32013eda95dc to your computer and use it in GitHub Desktop.
Laravel CMS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "ttungbmt/cms", | |
"description": "CMS - Awesome site", | |
"type": "cms", | |
"require": { | |
}, | |
"license": "MIT", | |
"authors": [ | |
{ | |
"name": "Truong Thanh Tung", | |
"email": "[email protected]" | |
} | |
], | |
"minimum-stability": "dev" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::get('test', function(){ | |
dd(01); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'; | |
}); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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