resource() public static method

Route a resource to a controller.
public static resource ( string $name, string $controller, array $options = [] ) : void
$name string
$controller string
$options array
return void
Esempio n. 1
1
 public static function run()
 {
     foreach (glob(app_path() . '/Http/Controllers/*.php') as $filename) {
         $file_parts = explode('/', $filename);
         $file = array_pop($file_parts);
         $file = rtrim($file, '.php');
         if ($file == 'Controller') {
             continue;
         }
         $controllerName = 'App\\Http\\Controllers\\' . $file;
         $controller = new $controllerName();
         if (isset($controller->exclude) && $controller->exclude === true) {
             continue;
         }
         $methods = [];
         $reflector = new \ReflectionClass($controller);
         foreach ($reflector->getMethods(\ReflectionMethod::IS_PUBLIC) as $rMethod) {
             // check whether method is explicitly defined in this class
             if ($rMethod->getDeclaringClass()->getName() == $reflector->getName()) {
                 $methods[] = $rMethod->getName();
             }
         }
         \Route::resource(strtolower(str_replace('Controller', '', $file)), $file, ['only' => $methods]);
     }
 }
 public static function returnRoutes()
 {
     $class = __CLASS__;
     Route::group(array('before' => 'auth', 'prefix' => 'admin'), function () use($class) {
         Route::resource('questions', $class, array('except' => array('show'), 'names' => array('index' => 'questions.index', 'create' => 'questions.create', 'store' => 'questions.store', 'edit' => 'questions.edit', 'update' => 'questions.update', 'destroy' => 'questions.destroy')));
     });
 }
Esempio n. 3
0
 public static function returnRoutes($prefix = null)
 {
     $class = __CLASS__;
     Route::group(array('before' => 'auth', 'prefix' => $prefix), function () use($class) {
         $entity = $class::$entity;
         Route::resource($class::$group, $class, array('except' => array('show'), 'names' => array('index' => $entity . '.index', 'create' => $entity . '.create', 'store' => $entity . '.store', 'edit' => $entity . '.edit', 'update' => $entity . '.update', 'destroy' => $entity . '.destroy')));
     });
 }
 public static function returnRoutes()
 {
     $class = __CLASS__;
     if (Auth::check() && Auth::user()->group_id == 3) {
         Route::group(array('before' => '', 'prefix' => 'admin'), function () use($class) {
             Route::resource('participant-groups', $class, array('except' => array('show'), 'names' => array('index' => 'participant_group.index', 'create' => 'participant_group.create', 'store' => 'participant_group.store', 'edit' => 'participant_group.edit', 'update' => 'participant_group.update', 'destroy' => 'participant_group.destroy')));
         });
     }
 }
Esempio n. 5
0
 public static function returnRoutes($prefix = null)
 {
     $class = __CLASS__;
     Route::group(array('before' => 'auth', 'prefix' => $prefix), function () use($class) {
         #Route::get($class::$group.'/manage', array('uses' => $class.'@getIndex'));
         #Route::controller($class::$group, $class);
         Route::resource('uploads', $class, array('except' => array('show'), 'names' => array('index' => 'uploads.index', 'create' => 'uploads.create', 'store' => 'uploads.store', 'edit' => 'uploads.edit', 'update' => 'uploads.update', 'destroy' => 'uploads.destroy')));
     });
 }
 public static function resource($name, $controller, array $options = [])
 {
     // CRUD routes
     Route::get($name . '/{sortby}/{order}', $controller . '@index');
     Route::get($name . '/orderby{lang}', $controller . '@index');
     Route::get($name . '/{id}/details', $controller . '@showDetailsRow');
     Route::get($name . '/{id}/translate/{lang}', $controller . '@translateItem');
     // Route::delete($name, $controller . '@destroy');
     Route::resource($name, $controller, $options);
 }
Esempio n. 7
0
 public function setUp()
 {
     parent::setUp();
     \Route::resource('/test', 'AngieTestController');
     \Route::resource('/test2', 'AngieTest2Controller', array('only' => array('index', 'show', 'post')));
     \Route::get('/test3', 'AngieTestController3@someGetMethod');
     \Route::get('/test/test3', 'AngieTestController3@someShowMethod');
     \Route::put('/test3/{id}/edit', 'AngieTestController3@somePutMethod');
     \Route::get('/test4/{id}/edit', array('prefix' => 'testprefix', 'uses' => 'AngieTestController4@someGetMethod'));
 }
 public static function returnRoutes($prefix = null)
 {
     $class = __CLASS__;
     $name = self::$name;
     $group = self::$group;
     Route::group(array('before' => 'auth', 'prefix' => $prefix), function () use($class, $name, $group) {
         #Route::controller($group . '/' . $name, $class);
         Route::get($group . '/' . $name . '/{menu_id}/manage', array('as' => $name . '.manage', 'uses' => $class . '@manage'));
         Route::resource($group . '/' . $name, $class, array('except' => array('show'), 'names' => array('index' => $name . '.index', 'create' => $name . '.create', 'store' => $name . '.store', 'edit' => $name . '.edit', 'update' => $name . '.update', 'destroy' => $name . '.destroy')));
     });
 }
 /**
  * Perform post-registration booting of services.
  *
  * @return void
  */
 public function boot()
 {
     $this->loadViewsFrom(__DIR__ . '/views/', 'modelRes');
     $this->publishes([__DIR__ . '/config/model_res.php' => config_path('model_res.php')]);
     $this->mergeConfigFrom(__DIR__ . '/config/model_res.php', 'model_res');
     $paths = config('model_res');
     ModelResorcesController::setPaths($paths);
     foreach ($paths as $key => $value) {
         \Route::resource($key, 'AVIL13\\ModelResorces\\ModelResorcesController');
     }
     return $this;
 }
Esempio n. 10
0
 public function setUp()
 {
     parent::setUp();
     $AngieServiceProvider = new AngieServiceProvider($this->app);
     $AngieServiceProvider->boot();
     \Route::resource('/test', 'AngieTestController1');
     \Route::resource('/test2', 'AngieTest2Controller', array('only' => array('index', 'show', 'store')));
     \Route::get('/test3', 'AngieTestController3@someGetMethod');
     \Route::get('/test/test3', 'AngieTestController3@someShowMethod');
     \Route::put('/test3/{id}/edit', 'AngieTestController3@somePutMethod');
     \Route::get('/test4/{id}/edit', 'Test\\Angie\\TestController4@somePutMethod');
     \Route::resource('/test5', 'Test\\Angie\\TestController5');
 }
Esempio n. 11
0
 public static function returnRoutes($prefix = null)
 {
     $class = __CLASS__;
     $entity = self::$entity;
     Route::group(array('before' => 'auth', 'prefix' => $prefix . "/" . $class::$group), function () use($class, $entity) {
         Route::post($entity . '/ajax-order-save', array('as' => 'dic.order', 'uses' => $class . "@postAjaxOrderSave"));
         Route::get('dic/{dic_id}/import', array('as' => 'dic.import', 'uses' => $class . '@getImport'));
         Route::post('dic/{dic_id}/import2', array('as' => 'dic.import2', 'uses' => $class . '@postImport2'));
         Route::post('dic/{dic_id}/import3', array('as' => 'dic.import3', 'uses' => $class . '@postImport3'));
         Route::get('dic/{dic_id}/sphinx', array('as' => 'dic.sphinx', 'uses' => $class . '@getSphinx'));
         Route::post('dic/{dic_id}/clear', array('as' => 'dic.clear', 'uses' => $class . '@postClear'));
         Route::resource('dic', $class, array('except' => array('show'), 'names' => array('index' => 'dic.index', 'create' => 'dic.create', 'store' => 'dic.store', 'edit' => 'dic.edit', 'update' => 'dic.update', 'destroy' => 'dic.destroy')));
     });
 }
 public function setUp()
 {
     parent::setUp();
     View::addLocation(__DIR__ . '/fixtures/views');
     $this->controllerName = "AcProjectsController";
     $this->modelName = "AcProject";
     $this->modelAttributes = ['id' => 5, 'name' => 'Test AuthorityController package', 'priority' => 1];
     $this->resourceName = "ac_projects";
     // str_plural(snake_case($this->modelName));
     Route::resource($this->resourceName, $this->controllerName);
     $this->userAttributes = ['id' => 1, 'username' => 'tortue', 'firstname' => 'Tortue', 'lastname' => 'Torche', 'email' => '*****@*****.**', 'password' => Hash::make('tortuetorche'), 'displayname' => 'Tortue Torche'];
     $this->user = $this->getUserWithRole('admin');
     $this->authority = $this->getAuthority($this->user);
     $this->authority->allow('manage', $this->modelName);
 }
 public static function returnRoutes($prefix = NULL)
 {
     $class = __CLASS__;
     Route::group(array('before' => 'auth', 'prefix' => $prefix), function () use($class) {
         $entity = $class::$entity;
         Route::get($class::$group . '/{id}/restore', array('as' => $entity . '.restore', 'uses' => $class . "@restore"));
         Route::get($class::$group . '/hierarchy', array('as' => $entity . '.hierarchy', 'uses' => $class . "@getHierarchy"));
         Route::post($class::$group . '/nestedsetmodel', array('as' => $class::$group . '.nestedsetmodel', 'uses' => $class . "@postAjaxNestedSetModel"));
         Route::resource($class::$group, $class, array('except' => array('show'), 'names' => array('index' => $entity . '.index', 'create' => $entity . '.create', 'store' => $entity . '.store', 'edit' => $entity . '.edit', 'update' => $entity . '.update', 'destroy' => $entity . '.destroy')));
     });
     Route::post('ajax-pages-get-page-blocks', $class . '@postAjaxPagesGetPageBlocks');
     Route::post('ajax-pages-get-block', $class . '@postAjaxPagesGetBlock');
     Route::post('ajax-pages-delete-block', $class . '@postAjaxPagesDeleteBlock');
     Route::post('ajax-pages-save-block', $class . '@postAjaxPagesSaveBlock');
 }
 /**
  * Define the routes for the application.
  *
  * @param  \Illuminate\Routing\Router $router
  * @return void
  */
 public function map(Router $router, Request $request)
 {
     $locale = $request->segment(1);
     if ($locale == 'localhost') {
         $locale = 'bg';
     }
     $this->app->setLocale($locale);
     $router->group(['namespace' => $this->namespace, 'prefix' => $locale, 'as' => $locale . '.', 'middleware' => 'language'], function ($router) {
         require app_path('Http/routes.php');
         $router->group(['prefix' => 'api/v1', 'as' => 'api.', 'middleware' => 'auth'], function ($router) {
             $router->group(['namespace' => 'Module\\Shop\\APIv1\\Http\\Controller'], function ($router) {
                 \Route::resource('attribute', 'AttributeController');
             });
         });
     });
 }
Esempio n. 15
0
 public function routes()
 {
     $prefix = Config::get('acl.route_prefix', '');
     \Route::group(['middleware' => ['acl'], 'prefix' => $prefix], function () {
         $permissions = Config::get('acl.routes.permissions', 'acl/permissions');
         $sections = Config::get('acl.routes.sections', 'acl/sections');
         $roles = Config::get('acl.routes.roles', 'acl/roles');
         $users = Config::get('acl.routes.users', 'acl/users');
         $acl = Config::get('acl.routes.index', 'acl');
         \Route::put($roles . '/permission', '\\AldoZumaran\\Acl\\Http\\Controllers\\AclRolesController@permission')->name(\Acl::route('roles', 'read_update', [], false));
         \Route::put($users . '/permission', '\\AldoZumaran\\Acl\\Http\\Controllers\\AclUsersController@permission')->name(\Acl::route('users', 'read_update', [], false));
         \Route::resource($permissions, '\\AldoZumaran\\Acl\\Http\\Controllers\\AclPermissionsController');
         \Route::resource($sections, '\\AldoZumaran\\Acl\\Http\\Controllers\\AclSectionsController');
         \Route::resource($roles, '\\AldoZumaran\\Acl\\Http\\Controllers\\AclRolesController');
         \Route::resource($users, '\\AldoZumaran\\Acl\\Http\\Controllers\\AclUsersController');
         \Route::resource($acl, '\\AldoZumaran\\Acl\\Http\\Controllers\\AclController');
     });
 }
 public static function returnRoutes($prefix = null)
 {
     $class = __CLASS__;
     $entity = self::$entity;
     Route::any('/ajax/check-dicval-slug-unique', array('as' => 'dicval.check-dicval-slug-unique', 'uses' => $class . "@postAjaxCheckDicvalSlugUnique"));
     Route::group(array('before' => 'auth', 'prefix' => $prefix . "/" . $class::$group), function () use($class, $entity) {
         Route::post($entity . '/ajax-order-save', array('as' => 'dicval.order', 'uses' => $class . "@postAjaxOrderSave"));
         Route::post($entity . '/ajax-nested-set-model', array('as' => 'dicval.nestedsetmodel', 'uses' => $class . "@postAjaxNestedSetModel"));
         Route::get($entity . '/{dic_slug}/{entity_id}/restore', array('as' => 'dicval.restore', 'uses' => $class . '@restore'));
         Route::resource('dic.val', $class, array('except' => array('show'), 'names' => array('index' => 'dicval.index', 'create' => 'dicval.create', 'store' => 'dicval.store', 'edit' => 'dicval.edit', 'update' => 'dicval.update', 'destroy' => 'dicval.destroy')));
     });
     Route::group(array('before' => 'auth', 'prefix' => $prefix), function () use($class, $entity) {
         Route::resource('/entity/{dic_slug}/', $class, array('except' => array('show', 'edit', 'update', 'destroy'), 'names' => array('index' => 'entity.index', 'create' => 'entity.create', 'store' => 'entity.store')));
         Route::get('/entity/{dic_slug}/{entity_id}/edit', array('as' => 'entity.edit', 'uses' => $class . '@edit'));
         Route::put('/entity/{dic_slug}/{entity_id}/update', array('as' => 'entity.update', 'uses' => $class . '@update'));
         Route::delete('/entity/{dic_slug}/{entity_id}', array('as' => 'entity.destroy', 'uses' => $class . '@destroy'));
         Route::get('/entity/{dic_slug}/{entity_id}/restore', array('as' => 'entity.restore', 'uses' => $class . '@restore'));
     });
 }
 public static function returnRoutes($prefix = null)
 {
     $class = __CLASS__;
     $entity = self::$entity;
     Route::group(array('before' => 'auth', 'prefix' => $prefix . "/" . $class::$group), function () use($class, $entity) {
         Route::post('cache/drop', array('as' => 'drop_cache', 'uses' => $class . '@dropCache'));
         Route::post('update', array('as' => $class::$group . '.' . $class::$name . '.update', 'uses' => $class . '@update'));
         Route::resource($class::$name, $class, array('except' => array('show', 'create', 'store', 'edit', 'update', 'destroy'), 'names' => array('index' => $class::$group . '.' . $class::$name . '.index')));
     });
     if (Cache::has('cms.settings')) {
         $settings = Cache::get('cms.settings');
     } else {
         $settings = Storage::where('module', 'system')->where('name', 'settings')->pluck('value');
         $settings = json_decode($settings, true);
     }
     Config::set('app.settings', $settings);
     #$temp = Config::get('app.settings.main');
     #dd($temp);
 }
Esempio n. 18
0
 public static function routes($app = false)
 {
     foreach (Admin::get() as $model) {
         if (!empty($model->middleware)) {
             if ($app) {
                 $app->group(['middleware' => $model->middleware], function () use($model, $app) {
                     Admin::resource($app, 'admin/' . strtolower($model->model), 'CRUDController');
                 });
             } else {
                 Route::group(['middleware' => $model->middleware], function () use($model) {
                     Route::resource('admin/' . strtolower($model->model), 'CRUDController');
                 });
             }
         } else {
             if ($app) {
                 Admin::resource($app, 'admin/' . strtolower($model->model), 'CRUDController');
             } else {
                 Route::resource('admin/' . strtolower($model->model), 'CRUDController');
             }
         }
     }
 }
/*
 |--------------------------------------------------------------------------
 | Application Routes
 |--------------------------------------------------------------------------
 |
 | Here is where you can register all of the routes for an application.
 | It's a breeze. Simply tell Laravel the URIs it should respond to
 | and give it the Closure to execute when that URI is requested.
 |
*/
Route::any('/', 'HomeController@index');
Route::group(['middleware' => ['web']], function () {
    Route::get('/api/directions/{from_city}/{to_city}', 'APIController@getDirections');
    Route::get('/api/getcities', 'APIController@getCities');
    //Route::post('/api/directions', 'APIController@getDirections');
    //Route::any('api/directions', 'APIController@getDirections');
    Route::post('getdata', 'HomeController@getData');
    Route::post('showresponce', 'HomeController@showResponceData');
    Route::post('getcities', 'HomeController@getCitiesData');
    Route::resource('users', 'UsersController');
    Route::resource('cities', 'CitiesController');
    Route::resource('tickets', 'TicketsController');
    Route::resource('/api', 'APIController');
    Route::resource('/home', 'HomeController');
});
Event::listen('illuminate.query', function () {
    /* print_r("<pre>");
       debug_print_backtrace();
       print_r("</pre>"); */
});
Esempio n. 20
0
<?php

Route::get('/', 'PagesController@home');
// Pages for flyers route
// Route::group(['middleware' => ['web']], function() {
// 	Route::resource('flyers', 'FlyersController');
// });
Route::group(['middleware' => ['web']], function () {
    Route::resource('flyers', 'FlyersController');
    Route::auth();
    Route::get('/home', 'HomeController@index');
    Route::get('{zip}/{street}', 'FlyersController@show');
    Route::post('{zip}/{street}/photos', 'FlyersController@addPhoto');
});
Esempio n. 21
0
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
if (!Auth::check()) {
    Route::get('/', 'SessionsController@create');
} else {
    Route::get('/', 'DashboardsController@index');
}
Route::get('registration', function () {
    $user = Auth::getUser();
    if (!$user->hasRole('Owner')) {
        return Reditect::back()->with('flash_message', 'You need to be an Owner to register a user.');
    }
    return View::make('registration.create');
});
Route::get('help', function () {
    return View::make('help.index');
});
Route::resource('records', 'RecordsController');
Route::resource('users', 'UsersController');
Route::resource('products', 'ProductsController');
Route::resource('Dashboard', 'DashboardsController');
Route::resource('daily', 'DailyController');
Route::resource('sessions', 'SessionsController', ['only' => ['store', 'create', 'destroy']]);
Route::resource('password_resets', 'PasswordResetsController');
Route::resource('manufacturers', 'ManufacturersController');
Route::get('login', 'SessionsController@create');
Route::get('logout', 'SessionsController@destroy');
Route::post('role', 'UsersController@controlRole');
Esempio n. 22
0
Route::group(['middleware' => ['authno']], function () {
    Route::get('login', 'UserController@showLogin')->name('login');
    Route::post('login', 'UserController@postLogin')->name('login.post');
    Route::get('register', 'UserController@showRegister')->name('register');
    Route::post('register', 'UserController@postRegister')->name('register.post');
});
# Admin User Section
Route::group(['middleware' => ['admin']], function () {
    Route::get('admin/dashboard', 'AdminController@dashboard')->name('dashboard');
    Route::post('showunits', 'AdminController@showUnits')->name('units.show');
    Route::resource('product', 'ProductController');
    // Route::get('admin/product', 'AdminController@productPage')->name('product');
    // Route::post('admin/product', 'AdminController@addProduct')->name('product.post');
});
# Authenticated User Section
Route::group(['middleware' => ['auth']], function () {
    Route::get('logout', 'UserController@logout')->name('logout');
    Route::post('cart/drop', 'HomeController@cartDrop')->name('cart.drop');
    Route::post('address', 'HomeController@addAddress')->name('address.add');
    Route::group(['namespace' => 'user'], function () {
        Route::resource('basket', 'BasketController');
        Route::resource('order', 'OrderController');
    });
});
Route::get('activate/{id}/{code}', function ($id, $code) {
    $user = Sentinel::findById($id);
    if (!Activation::complete($user, $code)) {
        return Redirect()->to("login")->withErrors('Invalid or expired activation code.');
    }
    return Redirect()->to('login')->withSuccess('Account activated.');
});
Esempio n. 23
0
/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', 'WelcomeController@index');
Route::get('/admin', function () {
    return redirect('/admin/home');
});
Route::get('home', 'HomeController@index');
Route::group(array('prefix' => '/', 'namespace' => 'Frontend'), function () {
    Route::resource('contacto', 'MessageController');
    Route::resource('Productos', 'ProductosController@productos');
    Route::resource('Servicios', 'ServiciosController@index');
});
Route::group(array('prefix' => 'admin', 'namespace' => 'Backend'), function () {
    Route::resource('home', 'AdminController');
    Route::resource('products', 'ProductController');
    Route::resource('services', 'ServiceController');
    Route::resource('types', 'TypeController');
    Route::resource('messages', 'TypeController');
    Route::get('products/{id}/destroy', ['uses' => 'ProductController@destroy', 'as' => 'Backend.products.destroy']);
    Route::get('types/{id}/destroy', ['uses' => 'TypeController@destroy', 'as' => 'Backend.types.destroy']);
    Route::get('services/{id}/destroy', ['uses' => 'ServiceController@destroy', 'as' => 'Backend.services.destroy']);
});
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
Esempio n. 24
0
<?php

Route::group(['middleware' => ['web']], function () {
    /*
     * Routes for PROGRAMS
     * Resource link to ProgramController.
     * Permalink/slug must be set trough .env file.
     */
    Route::resource(env('PERMALINK_PROGRAMS'), 'ProgramController', ['only' => ['index']]);
    /*
     * Routes for ADMIN
     * Resource link to AdminController.
     * User must be logged in to access these pages.
     */
    Route::resource('admin', 'AdminController', ['only' => ['index']]);
    /*
     * Routes for PAGES
     * Resource link to PageController.
     * This will load pages if no else route is matching
     */
    Route::resource('/', 'PageController', ['only' => ['index']]);
    /*
     * Routes for AUTHENTICATION
     * Resource link to AuthController.
     * This will load pages if no else route is matching
     */
    Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
    Route::get('/demo', function () {
        \App\User::create(['name' => 'Rasmus Kjellberg', 'email' => '*****@*****.**', 'password' => Hash::make('a)h3la!CMS')]);
    });
});
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
    return view('welcome');
});
Route::get('admin', function () {
    return view('admin.admin_template');
});
Route::get('test', 'TestController@index');
Route::group(['prefix' => 'admin', 'middleware' => 'auth'], function () {
    Route::resource('users', 'UsersController');
    Route::get('users/{id}/destroy', ['uses' => 'UsersController@destroy', 'as' => 'admin.users.destroy']);
    Route::resource('categories', 'CategoriesController');
    Route::get('categories/{id}/destroy', ['uses' => 'CategoriesController@destroy', 'as' => 'admin.categories.destroy']);
});
Route::get('auth/login', ['uses' => 'Auth\\AuthController@getLogin', 'as' => 'auth.login']);
Route::post('auth/login', ['uses' => 'Auth\\AuthController@postLogin', 'as' => 'auth.login']);
Route::get('auth/logout', ['uses' => 'Auth\\AuthController@getLogout', 'as' => 'auth.logout']);
Esempio n. 26
0
        Route::get('email', ['as' => 'password.email', 'uses' => 'PasswordController@getEmail']);
        Route::post('email', ['as' => 'password.email', 'uses' => 'PasswordController@postEmail']);
        Route::get('reset/{token}', ['as' => 'password.reset', 'uses' => 'PasswordController@getReset']);
        Route::post('reset', ['as' => 'password.reset', 'uses' => 'PasswordController@postEmail']);
    });
});
// API routes
Route::group(['prefix' => 'api', 'namespace' => 'Api'], function () {
    // DataTables
    Route::get('table/article', ['as' => 'api.table.article', 'uses' => 'DataTableController@getArticles']);
    Route::get('table/category', ['as' => 'api.table.category', 'uses' => 'DataTableController@getCategories']);
    Route::get('table/language', ['as' => 'api.table.language', 'uses' => 'DataTableController@getLanguages']);
    Route::get('table/user', ['as' => 'api.table.user', 'uses' => 'DataTableController@getUsers']);
});
// Admin routes
Route::group(['prefix' => 'admin', 'namespace' => 'Admin', 'middleware' => 'auth'], function () {
    // GET
    Route::get('/', ['as' => 'admin.root', 'uses' => 'DashboardController@index']);
    Route::get('setting', ['as' => 'admin.setting.index', 'uses' => 'SettingController@getSettings']);
    // POST
    Route::post('language/change', ['as' => 'admin.language.change', 'uses' => 'LanguageController@postChange']);
    Route::post('page/order', ['as' => 'admin.page.order', 'uses' => 'PageController@postOrder']);
    // PATCH
    Route::patch('setting/{setting}', ['as' => 'admin.setting.update', 'uses' => 'SettingController@patchSettings']);
    // Resources
    Route::resource('article', 'ArticleController');
    Route::resource('category', 'CategoryController');
    Route::resource('language', 'LanguageController');
    Route::resource('page', 'PageController');
    Route::resource('user', 'UserController');
});
Esempio n. 27
0
<?php

Route::group(['middleware' => 'web', 'prefix' => 'admin', 'namespace' => 'Modules\\TicketsAdmin\\Http\\Controllers'], function () {
    Route::get('/', 'UsersController@index');
    Route::resource('users', 'UsersController');
    Route::get('/apikey/{userId}', 'UsersController@generateApiKey')->name('admin.users.apikey');
    Route::resource('events', 'EventsController');
    Route::get('/test', 'TicketsAdminController@getApiKey');
});
Route::get('/admin/api/events/create', 'Modules\\TicketsAdmin\\Http\\Controllers\\ApiController@create');
Route::post('/admin/api/events/create', 'Modules\\TicketsAdmin\\Http\\Controllers\\ApiController@create');
Esempio n. 28
0
Route::post('/entry/store', 'EntryController@store');
Route::get('/test', function () {
    return view('welcome');
});
// Authentication routes...
Route::get('auth/login', 'Auth\\AuthController@getLogin');
Route::post('auth/login', 'Auth\\AuthController@postLogin');
Route::get('auth/logout', 'Auth\\AuthController@getLogout');
// Registration routes...
Route::get('auth/register', 'Auth\\AuthController@getRegister');
Route::post('auth/register', 'Auth\\AuthController@postRegister');
Route::get('/api/loggedUser', 'TaskController@loggedUser');
Route::get('category/create', 'CategoryController@create');
Route::post('category/store', 'CategoryController@store');
Route::get('category', 'CategoryController@index');
Route::get('/entry/getdoc/{id}', 'EntryController@download');
Route::get('/task', 'TaskController@index');
Route::get('/task/create', 'TaskController@create');
Route::get('/task/delete/{id}', 'TaskController@delete');
Route::post('/task/store', 'TaskController@store');
Route::get('/angular/task', 'TaskController@angularTask');
Route::get('/api/tasks', 'TaskController@apitasks');
Route::post('/api/task', 'TaskController@apitasksPost');
Route::put('/api/task/{id}', 'TaskController@apitasksPut');
Route::delete('/api/task/{id}', 'TaskController@apitaskDelete');
Route::get('/api/users', 'TaskController@apiUsers');
Route::group(['prefix' => 'api'], function () {
    Route::resource('authenticate', 'AuthenticateController', ['only' => ['index']]);
    Route::post('authenticate', 'AuthenticateController@authenticate');
    Route::get('authenticate/user', 'AuthenticateController@getAuthenticatedUser');
});
Esempio n. 29
0
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', 'WelcomeController@index');
Route::get('home', 'HomeController@index');
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
//rutas para el recurso Empresa
Route::resource('Empresa', 'EmpresaController');
//una nueva ruta para eliminar registros con el metodo get
Route::get('Empresa/destroy/{id}', ['as' => 'Empresa/destroy', 'uses' => 'EmpresaController@destroy']);
//ruta para realizar busquedas de registros
Route::post('Empresa/search', ['as' => 'Empresa/search', 'uses' => 'EmpresaController@search']);
Esempio n. 30
0
<?php

Route::get('admin/experiences', ['uses' => 'AdminExperiencesController@index', 'as' => 'AdminExperiences', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/review', ['uses' => 'AdminExperienceLocationsController@review', 'as' => 'AdminReview', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/expreviewadd', ['uses' => 'AdminExperienceLocationsController@expReviewAdd', 'as' => 'reviewexpAdd', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('admin/experienceReviewAdd', ['uses' => 'AdminExperienceLocationsController@experienceReviewAdd', 'as' => 'experienceReviewAdd', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/alacreviewadd', ['uses' => 'AdminExperienceLocationsController@alaReviewAdd', 'as' => 'alaReviewAdd', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('admin/alacarteReviewAdd', ['uses' => 'AdminExperienceLocationsController@alacarteReviewAdd', 'as' => 'alacarteReviewAdd', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('expreview/edit/{id}', ['uses' => 'AdminExperienceLocationsController@expReviewUpdate', 'as' => 'reviewUpdate', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('admin/expreview/updatesave', ['uses' => 'AdminExperienceLocationsController@expReviewUpdateSave', 'as' => 'expReviewUpdateSave', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('admin/alacarte/updatesave', ['uses' => 'AdminExperienceLocationsController@alaReviewUpdateSave', 'as' => 'alaReviewUpdateSave', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('alacartereview/edit/{id}', ['uses' => 'AdminExperienceLocationsController@alacarteReviewUpdate', 'as' => 'alacarteReviewUpdate', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('/admin/show_exp_review_update', ['uses' => 'AdminExperienceLocationsController@showExperienceReview', 'as' => 'showExperienceReview', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('/admin/show_alacart_review_update', ['uses' => 'AdminExperienceLocationsController@showAlacarteReview', 'as' => 'showAlacarteReview', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/reviewalacarte', ['uses' => 'AdminExperienceLocationsController@reviewAlacarte', 'as' => 'reviewAlacarte', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/experiences/create', ['uses' => 'AdminExperiencesController@create', 'as' => 'AdminExperienceCreate', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('admin/experiences/', ['uses' => 'AdminExperiencesController@store', 'as' => 'AdminExperienceStore', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/experiences/{id}', ['uses' => 'AdminExperiencesController@show', 'as' => 'AdminExperienceShow', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/experiences/{id}/edit', ['uses' => 'AdminExperiencesController@edit', 'as' => 'AdminExperienceEdit', 'middleware' => [], 'where' => ['id' => '\\d+'], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/experiences/locations/{id}/edit', ['uses' => 'AdminExperienceLocationsController@edit', 'as' => 'AdminExperienceLocationsEdit', 'middleware' => [], 'where' => ['id' => '\\d+'], 'domain' => env('WEBSITE_URL')]);
Route::put('admin/experiences/{id}', ['uses' => 'AdminExperiencesController@update', 'as' => 'AdminExperienceUpdate', 'middleware' => [], 'where' => ['id' => '\\d+'], 'domain' => env('WEBSITE_URL')]);
Route::put('admin/experiences/locations/{id}', ['uses' => 'AdminExperienceLocationsController@update', 'as' => 'AdminExperienceLocationsUpdate', 'middleware' => [], 'where' => ['id' => '\\d+'], 'domain' => env('WEBSITE_URL')]);
Route::delete('admin/experiences/{id}', ['uses' => 'AdminExperiencesController@destroy', 'as' => 'AdminExperienceDelete', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::resource('admin/experience/variants', 'AdminExperienceVariantsController', ['middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::resource('admin/experience/complex', 'AdminComplexExperiencesController', ['middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::resource('admin/experience/locations', 'AdminExperienceLocationsController', ['middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('admin/experience/locations/getVendorLocationsDetails', ['uses' => 'AdminExperienceLocationsController@getVendorLocationsDetails', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('/admin/experience/location/ajax_sort', ['uses' => 'AdminExperienceLocationsController@experienceSortOrder', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('/admin/experiences/location/{cityval}', ['uses' => 'AdminExperienceLocationsController@getExperienceScheduleCity', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::match(['get', 'post'], 'admin/experiences/deactive_Addon/{id}', ['uses' => 'AdminExperiencesController@deactive_Addon', 'middleware' => [], 'domain' => env('WEBSITE_URL')]);