Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Route::prefix('message')->group(function () {
- Route::get('/', 'CustomMessageController@index');
- });
- Route::prefix('message')->group(function () {
- Route::get('/', 'Http/Controllers/CustomMessageController@index');
- });
- $this->app->make('DevdojoCalculatorCalculatorController');
- <?php
- namespace Alive2212LaravelMessageServiceProviders;
- use IlluminateSupportFacadesRoute;
- use IlluminateFoundationSupportProvidersRouteServiceProvider as ServiceProvider;
- class AliveLaravelMessageServiceRouteServiceProvider extends ServiceProvider
- {
- protected $namespace = 'Alive2212LaravelMessageServiceHttpControllers';
- public function boot()
- {
- parent::boot();
- }
- public function map()
- {
- $this->mapApiRoutes();
- }
- protected function mapApiRoutes()
- {
- Route::prefix('alive_api')
- ->namespace($this->namespace)
- ->group(__DIR__.'/../../routes/api.php');
- }
- }
- public function boot()
- {
- $this->app->register(AliveLaravelMessageServiceRouteServiceProvider::class);
- }
- Route::prefix('message')->group(function () {
- Route::get('/', 'CustomMessageController@index');
- });
- namespace Alive2212LaravelMessageServiceHttpControllers;
- use Alive2212LaravelMessageServiceHttpControllersController;
- use Alive2212LaravelMessageServiceMessage;
- use IlluminateHttpRequest;
- class CustomMessageController extends Controller
- {
- protected $model;
- public function __construct()
- {
- $this->model = new Message();
- }
- public function index(Request $request)
- {
- return "the is my package index controller";
- }
- }
- public function register()
- {
- include __DIR__ . '/routes.php';
- }
Add Comment
Please, Sign In to add comment