Guest User

Untitled

a guest
Apr 25th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. Route::prefix('message')->group(function () {
  2. Route::get('/', 'CustomMessageController@index');
  3. });
  4.  
  5. Route::prefix('message')->group(function () {
  6. Route::get('/', 'Http/Controllers/CustomMessageController@index');
  7. });
  8.  
  9. $this->app->make('DevdojoCalculatorCalculatorController');
  10.  
  11. <?php
  12.  
  13. namespace Alive2212LaravelMessageServiceProviders;
  14.  
  15. use IlluminateSupportFacadesRoute;
  16. use IlluminateFoundationSupportProvidersRouteServiceProvider as ServiceProvider;
  17.  
  18. class AliveLaravelMessageServiceRouteServiceProvider extends ServiceProvider
  19. {
  20. protected $namespace = 'Alive2212LaravelMessageServiceHttpControllers';
  21.  
  22. public function boot()
  23. {
  24. parent::boot();
  25. }
  26.  
  27. public function map()
  28. {
  29. $this->mapApiRoutes();
  30. }
  31.  
  32. protected function mapApiRoutes()
  33. {
  34. Route::prefix('alive_api')
  35. ->namespace($this->namespace)
  36. ->group(__DIR__.'/../../routes/api.php');
  37. }
  38. }
  39.  
  40. public function boot()
  41. {
  42. $this->app->register(AliveLaravelMessageServiceRouteServiceProvider::class);
  43. }
  44.  
  45. Route::prefix('message')->group(function () {
  46. Route::get('/', 'CustomMessageController@index');
  47. });
  48.  
  49. namespace Alive2212LaravelMessageServiceHttpControllers;
  50.  
  51. use Alive2212LaravelMessageServiceHttpControllersController;
  52. use Alive2212LaravelMessageServiceMessage;
  53. use IlluminateHttpRequest;
  54.  
  55. class CustomMessageController extends Controller
  56. {
  57. protected $model;
  58.  
  59. public function __construct()
  60. {
  61. $this->model = new Message();
  62. }
  63.  
  64. public function index(Request $request)
  65. {
  66. return "the is my package index controller";
  67. }
  68.  
  69. }
  70.  
  71. public function register()
  72. {
  73. include __DIR__ . '/routes.php';
  74. }
Add Comment
Please, Sign In to add comment