delete() public static method

Register a new DELETE route with the router.
public static delete ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route
$uri string
$action Closure | array | string | null
return Illuminate\Routing\Route
Example #1
0
function routes($config)
{
    // only mess with the cms
    Route::group(['prefix' => $config['cms_path'], 'middleware' => ['cms.language', 'cms.view']], function () use($config) {
        Route::group(['namespace' => '\\Thorazine\\Cms\\Http\\Controllers'], function () use($config) {
            // pickup on first contact
            Route::get('/', ['as' => 'cms.auth.first', 'uses' => 'AuthController@first']);
            Route::post('/', ['as' => 'cms.auth.first.create', 'uses' => 'AuthController@create']);
            // auth
            Route::post('/login/submit', ['as' => 'cms.auth.check', 'before' => 'csrf', 'uses' => 'AuthController@check']);
            Route::get('/login', ['as' => 'cms.auth.login', 'uses' => 'AuthController@index']);
            // All routes that do require auth
            Route::group(['middleware' => ['cms.auth']], function () use($config) {
                // logout
                Route::get('/logout', ['as' => 'cms.auth.logout', 'uses' => 'AuthController@destroy']);
                // cms home
                Route::get('/base', ['as' => 'cms.base', 'uses' => 'CmsController@index']);
                // flexible auth routes
                Route::group(['middleware' => ['cms.model']], function () use($config) {
                    // flexible restfull routes
                    Route::get('/{module}/{model}/index', ['as' => 'module.model.index', 'uses' => 'PreController@index']);
                    Route::get('/{module}/{model}/create', ['as' => 'module.model.create', 'uses' => 'PreController@create']);
                    Route::post('/{module}/{model}/store', ['as' => 'module.model.store', 'uses' => 'PreController@store']);
                    Route::get('/{module}/{model}/show/{id}', ['as' => 'module.model.show', 'uses' => 'PreController@show']);
                    Route::get('/{module}/{model}/edit/{id}', ['as' => 'module.model.edit', 'uses' => 'PreController@edit']);
                    Route::put('/{module}/{model}/update/{id}', ['as' => 'module.model.update', 'uses' => 'PreController@update']);
                    Route::delete('/{module}/{model}/destroy/{id}', ['as' => 'module.model.destroy', 'uses' => 'PreController@destroy']);
                    Route::post('/{module}/{model}/order', ['as' => 'module.model.order', 'uses' => 'PreController@order']);
                    Route::get('/{module}/{model}/{action}', ['as' => 'module.model.action', 'uses' => 'PreController@custom']);
                });
            });
        });
    });
}
 /**
  * Install route patterns.
  *
  * @param null $baseUri
  */
 public static function install($baseUri = null)
 {
     $baseUri = $baseUri ? "{$baseUri}/" : "";
     \Route::post($baseUri . "resources/bulk/{resource}", "Foothing\\RepositoryController\\Controllers\\ResourceController@postBulk");
     \Route::put($baseUri . "resources/bulk/{resource}", "Foothing\\RepositoryController\\Controllers\\ResourceController@putBulk");
     \Route::put($baseUri . "resources/{resource}/{id}/link/{relation}/{related}/{relatedId}", "Foothing\\RepositoryController\\Controllers\\ResourceController@putLink");
     \Route::delete($baseUri . "resources/{resource}/{id}/link/{relation}/{related}/{relatedId}", "Foothing\\RepositoryController\\Controllers\\ResourceController@deleteLink");
     \Route::get($baseUri . "resources/{resource}/{id?}/{args?}", "Foothing\\RepositoryController\\Controllers\\ResourceController@getIndex")->where('args', '[a-zA-Z0-9/_]*');
     \Route::put($baseUri . "resources/{resource}/{id}", "Foothing\\RepositoryController\\Controllers\\ResourceController@putIndex");
     \Route::delete($baseUri . "resources/{resource}/{id}", "Foothing\\RepositoryController\\Controllers\\ResourceController@deleteIndex");
     \Route::post($baseUri . "resources/{resource}", "Foothing\\RepositoryController\\Controllers\\ResourceController@postIndex");
 }
Example #3
0
 public static function returnRoutes($prefix = null)
 {
     $class = __CLASS__;
     if (Auth::check() && Auth::user()->group_id == 3) {
         Route::group(array('before' => '', 'prefix' => 'admin'), function () use($class) {
             Route::get('participants', array('as' => 'moderator.participants', 'uses' => $class . '@participantsList'));
             Route::post('participant/{user_id}/save', array('before' => 'csrf', 'as' => 'moderator.participants.save', 'uses' => $class . '@participantsSave'));
             Route::get('participants/{params}', array('as' => 'moderator.participants.lists', 'uses' => $class . '@participantsLists'))->where('params', '(all|phone|email)');
             Route::post('participants/{params}', array('as' => 'moderator.participants.lists', 'uses' => $class . '@participantsListsImport'));
             Route::get('participants/{user_id}/edit', array('as' => 'moderator.participants.edit', 'uses' => $class . '@participantsEdit'));
             Route::post('participants/{user_id}/update', array('as' => 'moderator.participants.update', 'uses' => $class . '@participantsUpdate'));
             Route::get('casting', array('as' => 'moderator.casting', 'uses' => $class . '@casting'));
             Route::post('casting/{params}', array('as' => 'moderator.casting.import', 'uses' => $class . '@castingListsImport'));
             Route::delete('casting/{casting_id}/destroy', array('as' => 'moderator.casting.delete', 'uses' => $class . '@castingDelete'));
         });
         Route::get('participants/{user_id}/status/{status_number}', array('as' => 'moderator.participants.status', 'uses' => $class . '@participantsSetStatus'));
     }
 }
 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'));
     });
 }
Example #5
0
 private function registerCommands()
 {
     Route::group(['prefix' => 'man', 'before' => 'manage.auth.basic'], function () {
         Route::any('content/blocks', ContentBlockController::class . '@index');
         Route::post('content/blocks/store', ContentBlockController::class . '@store');
         Route::post('content/blocks/{id}', ContentBlockController::class . '@update');
         Route::delete('content/blocks/{id}', ContentBlockController::class . '@delete');
         Route::any('service/titles', ServiceTitleController::class . '@index');
         Route::post('service/titles/{id}', ServiceTitleController::class . '@update');
         Route::get('requests', OrderRequestController::class . '@index');
         Route::any('reporter', ReportController::class . '@index');
         Route::any('reporter/invite/stat', ReportController::class . '@inviteStat');
         Route::any('reporter/reviews', ReportController::class . '@orderReviews');
         Route::any('autopays', AutoPayController::class . '@index');
         Route::any('autopays/orders/{cid}', AutoPayController::class . '@orders');
         Route::any('autopays/start/{order_id}/{customer_id}', AutoPayController::class . '@start');
         Route::any('autopays/check_customers_orders/{customer_id}', AutoPayController::class . '@checkCustomersOrders');
         Route::any('autopays/autopay_all', AutoPayController::class . '@autopayAll');
     });
 }
Example #6
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')]);
Example #7
0
<?php

Route::group(['middleware' => 'logged_in'], function () {
    Route::get('/', ['as' => 'home', 'uses' => 'HomeController@index']);
    // Authentication routes
    Route::get('auth/login', ['as' => 'login', 'uses' => 'Auth\\AuthController@getLogin']);
    Route::post('auth/login', ['as' => 'doLogin', 'uses' => 'Auth\\AuthController@postLogin']);
    Route::get('auth/logout', ['as' => 'doLogout', 'uses' => 'Auth\\AuthController@getLogout']);
    Route::group(['middleware' => 'auth'], function () {
        Route::get('dashboard', ['as' => 'dashboard', 'uses' => 'HomeController@dashboard']);
        Route::group(['prefix' => 'notes'], function () {
            Route::get('/', ['as' => 'notes.index', 'uses' => 'NotesController@index']);
            Route::get('all', ['as' => 'notes.all', 'uses' => 'NotesController@all']);
            Route::post('/', ['as' => 'notes.save', 'uses' => 'NotesController@save']);
            Route::post('/{id}', ['as' => 'notes.update', 'uses' => 'NotesController@update']);
            Route::delete('/{id}', ['as' => 'notes.destroy', 'uses' => 'NotesController@destroy']);
        });
        Route::group(['prefix' => 'tasks'], function () {
            Route::get('/bycategory/{id}', ['as' => 'tasks.bycategory', 'uses' => 'TasksController@byCategory']);
            Route::get('/categories', ['as' => 'task-categories.all', 'uses' => 'TaskCategoryController@all']);
            Route::post('/categories', ['as' => 'task-categories.save', 'uses' => 'TaskCategoryController@save']);
            Route::post('/categories/{id}', ['as' => 'task-categories.update', 'uses' => 'TaskCategoryController@update']);
            Route::delete('/categories/{id}', ['as' => 'task-categories.destroy', 'uses' => 'TaskCategoryController@destroy']);
            Route::get('/', ['as' => 'tasks.index', 'uses' => 'TasksController@index']);
            Route::get('all', ['as' => 'tasks.all', 'uses' => 'TasksController@all']);
            Route::post('/', ['as' => 'tasks.save', 'uses' => 'TasksController@save']);
            Route::post('/{id}', ['as' => 'tasks.update', 'uses' => 'TasksController@update']);
            Route::delete('/{id}', ['as' => 'tasks.destroy', 'uses' => 'TasksController@destroy']);
        });
    });
});
Example #8
0
<?php

Route::get('/', 'Controller@index');
Route::get('/tasks', 'TasksController@getTasksAll');
Route::get('/tasks/{id}', 'TasksController@getTaskById');
Route::post('/tasks', 'TasksController@createTask');
Route::put('/tasks/{id}', 'TasksController@updateTaskById');
Route::delete('/tasks/{id}', 'TasksController@deleteTaskById');
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
/*
Route::group(['middleware' => ['web']], function () {
    //
});
*/
*/
// //////////////////////////////
// Index + News
// [ GET ]
Route::get('/', 'IndexController@index');
// All news
Route::get('/news', 'NewsController@all');
// View news post
Route::get('/news/{id}', 'NewsController@post');
// View post editor
Route::get('/news/{id}/edit', 'NewsController@post_edit');
// [ POST ]
// Update current view
Route::post('/news/{id}', 'NewsController@post_edit_save');
// [ DELETE ]
Route::delete('/news/{id}', 'NewsController@post_delete');
///////////////////////////////// Index + News END
///
///
///
// //////////////////////////////
// Authentication
// [ GET ]
Route::get('/auth/login', 'Auth\\AuthController@getLogin');
Route::get('/auth/logout', 'Auth\\AuthController@getLogout');
Route::get('/auth/register', 'Auth\\AuthController@getRegister');
// [ POST ]
Route::post('/auth/login', 'Auth\\AuthController@postLogin');
Route::post('/auth/register', 'Auth\\AuthController@postRegister');
///////////////////////////////// Auth END
///
Route::match(array('GET', 'POST'), 'admin', array('as' => 'admin', 'before' => 'isAdmin', 'uses' => 'AdminController@adminQuery'));
Route::get('close', array('as' => 'close', function () {
    if (!Session::has('module')) {
        return Redirect::route('/');
    }
    return Response::view('close');
}));
Route::get('module/login', array('as' => 'module-login', function () {
    if (Session::has('user')) {
        return Redirect::route('module', array('uuid' => Input::get('uuid')));
    }
    return Response::view('module');
}));
Route::post('module/auth', array('before' => 'module-auth', 'uses' => 'AuthController@authModule'));
Route::get('module/auth', array('uses' => 'AuthController@getAuthModule'));
Route::delete('module/auth', array('uses' => 'AuthController@deauthModule'));
Route::post('module/ping.php', array('uses' => 'MarkerSiteController@autoPostModule'));
Route::get('module', array('as' => 'module', 'before' => 'module', function () {
    $moduleUUID = Input::get('uuid');
    Session::set('module', $moduleUUID);
    $moduleAuth = DB::table('auth')->where('token', '=', $moduleUUID)->first();
    $moduleHasSite = $moduleAuth != NULL ? 1 : 0;
    if (Session::has(user)) {
        $user = Session::get(user);
        Log::info('Logged user: '******'auth')->where('token', '=', $user->uid)->lists('atlas_id');
        $list = json_encode($privileges);
        Log::info('Authorized site: ' . $list);
        Log::info('Authorized module: ' . $moduleUUID);
        Log::info('Module attached: ' . $moduleHasSite);
        return View::make('index', array('user' => $user, 'auth_site' => $list, 'moduleUUID' => $moduleUUID, 'moduleHasSite' => $moduleHasSite));
Example #11
0
    return redirect()->back(1);
}]);
// Routes del Profesor **********************************
Route::group(['middleware' => ['auth', 'is_profesor']], function () {
    Route::get('profesor/consultarproyecto', ['as' => 'profesor.consultarproyecto', 'uses' => 'ProfesorActionController@consultProject']);
    Route::get('profesor/evaluarproyecto/{id}', ['as' => 'profesor.evaluarproyecto', 'uses' => 'ProfesorActionController@evaluarProject']);
    Route::get('profesor/verpdfs/{id_user}', ['as' => 'profesor.verpdfs', 'uses' => 'ProfesorActionController@verPdfs']);
    Route::delete('profesor/destroypdf/{id}', ['as' => 'profesor.destroypdf', 'uses' => 'ProfesorActionController@destroyPdf']);
    Route::get('profesor/verevaluaciones/{id}', ['as' => 'profesor.verevaluaciones', 'uses' => 'ProfesorActionController@showEvaluations']);
    Route::get('profesor/evaluarproyecto/{id_user}', ['as' => 'profesor.evaluarproyecto', 'uses' => 'ProfesorActionController@evaluarProject']);
    Route::post('profesor/storeevaluacion', ['as' => 'profesor.evaluacion.store', 'uses' => 'ProfesorActionController@storeEvaluation']);
    Route::get('profesor/actualizarevaluacion/{id_user}', ['as' => 'profesor.actualizarevaluacion', 'uses' => 'ProfesorActionController@editEvaluation']);
    Route::put('profesor/updateevaluacion/{id_user}', ['as' => 'profesor.evaluacion.update', 'uses' => 'ProfesorActionController@updateEvaluation']);
    Route::get('profesor/detalledeevaluacion/{id_user}/{id_evaluador}', ['as' => 'profesor.evaluaciondetalle', 'uses' => 'ProfesorActionController@detailEvaluation']);
    Route::get('profesor/cambiar-password', ['as' => 'profesor.cambiar', 'uses' => 'ProfesorActionController@changePassword']);
    Route::put('profesor/update-password', ['as' => 'profesor.update.password', 'uses' => 'ProfesorActionController@updatePassword']);
    Route::resource('profesor', 'ProfesorActionController');
});
// Routes del Estudiante **********************************
Route::group(['middleware' => ['auth', 'is_estudiante']], function () {
    Route::get('estudiante/miproyecto/{id_user}', ['as' => 'estudiante.miproyecto', 'uses' => 'EstudianteActionController@miProyecto']);
    Route::get('estudiante/mispdf/{id_user}', ['as' => 'estudiante.mispdf', 'uses' => 'EstudianteActionController@getListPdfs']);
    Route::post('estudiante/storepdf/{id_user}', ['as' => 'estudiante.mispdf.store', 'uses' => 'EstudianteActionController@subirPdf']);
    Route::get('estudiante/evaluaciondetalle/{id_user}', ['as' => 'estudiante.evaluaciondetalle', 'uses' => 'EstudianteActionController@getDetailsEvaluation']);
    Route::delete('estudiante/destroypdf/{id}', ['as' => 'estudiante.destroypdf', 'uses' => 'EstudianteActionController@destroyPdf']);
    Route::get('estudiante/misevaluacione/{id_user}', ['as' => 'estudiante.misevaluaciones', 'uses' => 'EstudianteActionController@showEvaluations']);
    Route::get('estudiante/detallesdeevaluacion/{id_user}/{id_evaluador}', ['as' => 'estudiante.evaluaciondetalle', 'uses' => 'EstudianteActionController@detailEvaluation']);
    Route::get('estudiante/cambiar-contraseƱa', ['as' => 'estudiante.cambiar', 'uses' => 'EstudianteActionController@changePassword']);
    Route::put('estudiante/update-password', ['as' => 'estudiante.update.password', 'uses' => 'EstudianteActionController@updatePassword']);
    Route::resource('estudiante', 'EstudianteActionController');
});
Example #12
0
# ------------------ Votes ------------------------
Route::group(['before' => 'auth'], function () {
    Route::post('/topics/{id}/upvote', ['as' => 'topics.upvote', 'uses' => 'TopicsController@upvote']);
    Route::post('/topics/{id}/downvote', ['as' => 'topics.downvote', 'uses' => 'TopicsController@downvote']);
    Route::post('/replies/{id}/vote', ['as' => 'replies.vote', 'uses' => 'RepliesController@vote']);
    Route::post('/topics/{id}/append', ['as' => 'topics.append', 'uses' => 'TopicsController@append']);
});
# ------------------ Admin Route ------------------------
Route::group(['before' => 'manage_topics'], function () {
    Route::post('topics/recomend/{id}', ['as' => 'topics.recomend', 'uses' => 'TopicsController@recomend']);
    Route::post('topics/wiki/{id}', ['as' => 'topics.wiki', 'uses' => 'TopicsController@wiki']);
    Route::post('topics/pin/{id}', ['as' => 'topics.pin', 'uses' => 'TopicsController@pin']);
    Route::post('topics/sink/{id}', ['as' => 'topics.sink', 'uses' => 'TopicsController@sink']);
});
Route::delete('topics/delete/{id}', ['as' => 'topics.destroy', 'uses' => 'TopicsController@destroy']);
Route::delete('account/topics/delete/{id}', ['as' => 'ac.topics.destroy', 'uses' => 'TopicsController@destroy']);
Route::group(['before' => 'manage_users'], function () {
    Route::post('users/blocking/{id}', ['as' => 'users.blocking', 'uses' => 'UsersController@blocking']);
});
Route::post('upload_image', ['as' => 'upload_image', 'uses' => 'TopicsController@uploadImage', 'before' => 'auth']);
// Health Checking
Route::get('heartbeat', function () {
    return Node::first();
});
Route::get('/github-api-proxy/users/{username}', ['as' => 'users.github-api-proxy', 'uses' => 'UsersController@githubApiProxy']);
Route::get('/github-card', ['as' => 'users.github-card', 'uses' => 'UsersController@githubCard']);
#-------------------register System-------------
Route::get('/ow_login', ['as' => 'ow_login', 'uses' => 'ow_AuthController@show_login']);
Route::post('/ow_login', ['as' => 'Do_Login', 'uses' => 'ow_AuthController@Do_Login']);
Route::get('/ow_register', ['as' => 'ow_register', 'uses' => 'ow_AuthController@show_register']);
Route::post('/ow_register', ['as' => 'ow_register', 'uses' => 'ow_AuthController@ow_Auth_register']);
Example #13
0
    Route::post('forgot', ['as' => 'sentinel.reset.request', 'uses' => 'RegistrationController@sendResetPasswordEmail']);
    Route::get('reset/{hash}/{code}', ['as' => 'sentinel.reset.form', 'uses' => 'RegistrationController@passwordResetForm']);
    Route::post('reset/{hash}/{code}', ['as' => 'sentinel.reset.password', 'uses' => 'RegistrationController@resetPassword']);
    // Sentinel Profile
    Route::get('profile', ['as' => 'sentinel.profile.show', 'uses' => 'ProfileController@show']);
    Route::get('profile/edit', ['as' => 'sentinel.profile.edit', 'uses' => 'ProfileController@edit']);
    Route::put('profile', ['as' => 'sentinel.profile.update', 'uses' => 'ProfileController@update']);
    Route::post('profile/password', ['as' => 'sentinel.profile.password', 'uses' => 'ProfileController@changePassword']);
    // Sentinel Users
    Route::get('users', ['as' => 'sentinel.users.index', 'uses' => 'UserController@index']);
    Route::get('users/create', ['as' => 'sentinel.users.create', 'uses' => 'UserController@create']);
    Route::post('users', ['as' => 'sentinel.users.store', 'uses' => 'UserController@store']);
    Route::get('users/{hash}', ['as' => 'sentinel.users.show', 'uses' => 'UserController@show']);
    Route::get('users/{hash}/edit', ['as' => 'sentinel.users.edit', 'uses' => 'UserController@edit']);
    Route::post('users/{hash}/password', ['as' => 'sentinel.password.change', 'uses' => 'UserController@changePassword']);
    Route::post('users/{hash}/memberships', ['as' => 'sentinel.users.memberships', 'uses' => 'UserController@updateGroupMemberships']);
    Route::put('users/{hash}', ['as' => 'sentinel.users.update', 'uses' => 'UserController@update']);
    Route::delete('users/{hash}', ['as' => 'sentinel.users.destroy', 'uses' => 'UserController@destroy']);
    Route::get('users/{hash}/suspend', ['as' => 'sentinel.users.suspend', 'uses' => 'UserController@suspend']);
    Route::get('users/{hash}/unsuspend', ['as' => 'sentinel.users.unsuspend', 'uses' => 'UserController@unsuspend']);
    Route::get('users/{hash}/ban', ['as' => 'sentinel.users.ban', 'uses' => 'UserController@ban']);
    Route::get('users/{hash}/unban', ['as' => 'sentinel.users.unban', 'uses' => 'UserController@unban']);
    // Sentinel Groups
    Route::get('groups', ['as' => 'sentinel.groups.index', 'uses' => 'GroupController@index']);
    Route::get('groups/create', ['as' => 'sentinel.groups.create', 'uses' => 'GroupController@create']);
    Route::post('groups', ['as' => 'sentinel.groups.store', 'uses' => 'GroupController@store']);
    Route::get('groups/{hash}', ['as' => 'sentinel.groups.show', 'uses' => 'GroupController@show']);
    Route::get('groups/{hash}/edit', ['as' => 'sentinel.groups.edit', 'uses' => 'GroupController@edit']);
    Route::put('groups/{hash}', ['as' => 'sentinel.groups.update', 'uses' => 'GroupController@update']);
    Route::delete('groups/{hash}', ['as' => 'sentinel.groups.destroy', 'uses' => 'GroupController@destroy']);
});
Example #14
0
Route::post('register', ['as' => 'register_path', 'uses' => 'RegistrationController@store']);
/**
 * Sessions
 */
Route::get('login', ['as' => 'login_path', 'uses' => 'SessionsController@create']);
/**
 * Sessions
 */
Route::post('login', ['as' => 'login_path', 'uses' => 'SessionsController@store']);
/**
 * Sessions
 */
Route::get('logout', ['as' => 'logout_path', 'uses' => 'SessionsController@destroy']);
/**
 * Statuses
 */
Route::get('statuses', ['as' => 'statuses_path', 'uses' => 'StatusesController@index']);
Route::post('statuses', ['as' => 'statuses_path', 'uses' => 'StatusesController@store']);
Route::post('statuses/{id}/comments', ['as' => 'comment_path', 'uses' => 'CommentsController@store']);
/**
 * Users
 */
Route::get('users', ['as' => 'users_path', 'uses' => 'UsersController@index']);
Route::get('@{username}', ['as' => 'profile_path', 'uses' => 'UsersController@show']);
/**
 * Follows
 */
Route::post('follows', ['as' => 'follows_path', 'uses' => 'FollowsController@store']);
Route::delete('follows/{id}', ['as' => 'follow_path', 'uses' => 'FollowsController@destroy']);
// Reset password
Route::controller('password', 'RemindersController');
Example #15
0
| and give it the controller to call when that URI is requested.
|
*/
// Home page
Route::get('/', function () {
    if (Auth::check()) {
        return redirect()->action('ReminderController@index');
    } else {
        return view('spark::welcome');
    }
});
// Authenticated user routes
Route::group(['middleware' => 'auth'], function () {
    // Redirect home to reminder
    Route::get('home', function () {
        return redirect()->action('ReminderController@index');
    });
    // Reminders Section
    Route::group(['prefix' => 'reminder'], function () {
        // Create
        Route::get('create', 'ReminderController@create');
        Route::post('create', 'ReminderController@store');
        // List all
        Route::get('/', 'ReminderController@index');
        // Update
        Route::get('edit/{id}', 'ReminderController@edit');
        Route::patch('edit/{id}', 'ReminderController@update');
        // Delete
        Route::delete('delete/{id}', 'ReminderController@destroy');
    });
});
Example #16
0
        Route::get('{id}', ['as' => 'admin.sanatorium.shoporders.paymentstatuses.edit', 'uses' => 'PaymentstatusesController@edit']);
        Route::post('{id}', ['as' => 'admin.sanatorium.shoporders.paymentstatuses.edit', 'uses' => 'PaymentstatusesController@update']);
        Route::delete('{id}', ['as' => 'admin.sanatorium.shoporders.paymentstatuses.delete', 'uses' => 'PaymentstatusesController@delete']);
    });
    Route::group(['prefix' => 'shoporders/paymentstatuses', 'namespace' => 'Sanatorium\\Shoporders\\Controllers\\Frontend'], function () {
        Route::get('/', ['as' => 'sanatorium.shoporders.paymentstatuses.index', 'uses' => 'PaymentstatusesController@index']);
    });
    Route::group(['prefix' => admin_uri() . '/shoporders/deliverystatuses', 'namespace' => 'Sanatorium\\Shoporders\\Controllers\\Admin'], function () {
        Route::get('/', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.all', 'uses' => 'DeliverystatusesController@index']);
        Route::post('/', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.all', 'uses' => 'DeliverystatusesController@executeAction']);
        Route::get('grid', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.grid', 'uses' => 'DeliverystatusesController@grid']);
        Route::get('create', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.create', 'uses' => 'DeliverystatusesController@create']);
        Route::post('create', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.create', 'uses' => 'DeliverystatusesController@store']);
        Route::get('{id}', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.edit', 'uses' => 'DeliverystatusesController@edit']);
        Route::post('{id}', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.edit', 'uses' => 'DeliverystatusesController@update']);
        Route::delete('{id}', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.delete', 'uses' => 'DeliverystatusesController@delete']);
    });
    Route::group(['prefix' => 'shoporders/deliverystatuses', 'namespace' => 'Sanatorium\\Shoporders\\Controllers\\Frontend'], function () {
        Route::get('/', ['as' => 'sanatorium.shoporders.deliverystatuses.index', 'uses' => 'DeliverystatusesController@index']);
    });
}, 'seeds' => [], 'permissions' => function (Permissions $permissions) {
    $permissions->group('order', function ($g) {
        $g->name = 'Orders';
        $g->permission('order.index', function ($p) {
            $p->label = trans('sanatorium/shoporders::orders/permissions.index');
            $p->controller('Sanatorium\\Shoporders\\Controllers\\Admin\\OrdersController', 'index, grid');
        });
        $g->permission('order.create', function ($p) {
            $p->label = trans('sanatorium/shoporders::orders/permissions.create');
            $p->controller('Sanatorium\\Shoporders\\Controllers\\Admin\\OrdersController', 'create, store');
        });
Example #17
0
        return redirect('/')->withInput()->withErrors($validator);
    }
    $task = new Task();
    $task->name = $request->name;
    $task->save();
    return redirect('/');
});
Route::get('/', function () {
    $tasks = Task::orderBy('created_at', 'asc')->get();
    return view('tasks', ['tasks' => $tasks]);
});
/**
 * Delete An Existing Task
 */
Route::delete('/task/{id}', function ($id) {
    Task::findOrFail($id)->delete();
    return redirect('/');
});
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
Route::group(['middleware' => ['web']], function () {
    //
});
Example #18
0
<?php

Route::get('backend/shop/orders', 'Creolab\\Shop\\Controllers\\Admin\\OrdersController@index');
// ! Cart items
Route::get('cart/items', array('as' => 'cart.items.add', 'uses' => 'Creolab\\Shop\\Controllers\\Cart\\ItemController@store'));
Route::post('cart/items', array('as' => 'cart.items.add', 'uses' => 'Creolab\\Shop\\Controllers\\Cart\\ItemController@store'));
Route::put('cart/items/{id}', array('as' => 'cart.items.update', 'uses' => 'Creolab\\Shop\\Controllers\\Cart\\ItemController@update'));
Route::delete('cart/items/{id}', array('as' => 'cart.items.remove', 'uses' => 'Creolab\\Shop\\Controllers\\Cart\\ItemController@destroy'));
// ! Cart
Route::delete('cart/empty', array('as' => 'cart.empty', 'uses' => 'Creolab\\Shop\\Controllers\\Cart\\CartController@emptyItems'));
Route::get('cart/empty', array('as' => 'cart.empty', 'uses' => 'Creolab\\Shop\\Controllers\\Cart\\CartController@emptyItems'));
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', 'PagesController@index');
Route::get('faqs', 'PagesController@faqs');
Route::get('support', 'PagesController@support');
Route::get('contact', 'PagesController@contact');
Route::get('calendar', 'PagesController@calendar');
Route::get('tour', 'PagesController@tour');
Route::get('volunteer', 'PagesController@volunteer');
$router->group(['middleware' => 'auth'], function () {
    Route::get('admin', 'PagesController@admin');
    Route::resource('volunteers', 'VolunteersController', ['only' => ['index', 'show', 'destroy']]);
    Route::resource('faqs', 'FaqController', ['except' => ['index', 'show']]);
    Route::resource('wishlists', 'WishListController', ['except' => ['index']]);
    Route::resource('supports', 'SupportController', ['except' => ['index']]);
    Route::resource('emails', 'EmailsController', ['except' => ['new', 'create', 'destroy']]);
    Route::post('change-password', ['as' => 'admin.change.password', 'uses' => 'FormController@change_password']);
    Route::post('update_user_info', ['as' => 'update.user.info', 'uses' => 'FormController@update_user_info']);
    Route::get('admin/newsletter', 'EmailsController@create');
    Route::post('admin/send_email', ['as' => 'newsletter.send', 'uses' => 'EmailsController@send_email']);
    Route::post('admin/update_email/{id}', ['as' => 'update.admin.email', 'uses' => 'EmailsController@update']);
    Route::post('/update-content', 'PagesController@update_content');
});
Route::post('emails', ['as' => 'emails.store', 'uses' => 'EmailsController@store']);
Route::delete('emails', ['as' => 'emails.destroy', 'uses' => 'EmailsController@destroy']);
Route::get('emails', 'EmailsController@index');
Route::get('/login', 'PagesController@login');
Route::post('contact', ['as' => 'contact_store', 'uses' => 'FormController@store']);
Route::post('volunteer', ['uses' => 'VolunteersController@store']);
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
Example #20
0
            });
            Route::get('cleanup', function () {
                FieldController::cleanup();
                FileController::findOrphans();
                FileController::cleanup();
            });
            # Complex instance routing, optionally with linked_id for related objects
            Route::get('/{object_name}/delete/{instance_id}', 'InstanceController@delete');
            Route::get('/{object_name}', 'InstanceController@index');
            Route::get('/{object_name}/export', 'InstanceController@export');
            Route::get('/{object_name}/create/{linked_id?}', 'InstanceController@create');
            Route::post('/{object_name}/reorder', 'InstanceController@reorder');
            Route::post('/{object_name}/{linked_id?}', 'InstanceController@store');
            Route::get('/{object_name}/{instance_id}/{linked_id?}', 'InstanceController@edit');
            Route::put('/{object_name}/{instance_id}/{linked_id?}', 'InstanceController@update');
            Route::delete('/{object_name}/{instance_id}', 'InstanceController@destroy');
        });
    }
});
Route::filter('user', function () {
    if (empty(Auth::user()->role) || Auth::user()->role > 3) {
        return Redirect::action('ObjectController@index');
    }
});
Route::filter('admin', function () {
    if (empty(Auth::user()->role) || Auth::user()->role > 2) {
        return Redirect::action('ObjectController@index');
    }
});
Route::filter('programmer', function () {
    if (empty(Auth::user()->role) || Auth::user()->role > 1) {
Example #21
0
<?php

Route::get('/api/centrales/{conductor_id}/pasajeros', 'Central\\PasajeroController@index');
Route::post('/api/centrales/{conductor_id}/pasajeros', 'Central\\PasajeroController@store');
Route::get('/api/pasajeros/{pasajero_id}', 'Central\\PasajeroController@show');
Route::put('/api/pasajeros/{pasajero_id}', 'Central\\PasajeroController@update');
Route::delete('/api/pasajeros/{pasajero_id}', 'Central\\PasajeroController@destroy');
Example #22
0
<?php

Route::get('/', function () {
    return view('welcome');
})->middleware('guest');
// Task Routes
Route::get('tasks', 'TaskController@index');
Route::post('task', 'TaskController@add');
Route::delete('task/{task}', 'TaskController@destroy');
// 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');
// Initial nu stiam sa fac rutele si am incercat un php artisan route:list :))
Example #23
0
<?php

Route::group(['middleware' => 'can:ACCESS_DOCUMENTS'], function () {
    Route::resource('documents', 'DocumentsController', ['except' => ['show', 'create'], 'names' => ['index' => 'reactor.documents.index', 'store' => 'reactor.documents.store', 'edit' => 'reactor.documents.edit', 'update' => 'reactor.documents.update', 'destroy' => 'reactor.documents.destroy']]);
    Route::get('documents/upload', ['uses' => 'DocumentsController@upload', 'as' => 'reactor.documents.upload']);
    Route::get('documents/embed', ['uses' => 'DocumentsController@embed', 'as' => 'reactor.documents.embed']);
    Route::post('documents/embed', ['uses' => 'DocumentsController@storeEmbedded', 'as' => 'reactor.documents.embed.store']);
    Route::get('documents/image/{id}', ['uses' => 'DocumentsController@image', 'as' => 'reactor.documents.image.edit']);
    Route::put('documents/image/{id}', ['uses' => 'DocumentsController@imageUpdate', 'as' => 'reactor.documents.image.update']);
    Route::get('documents/download/{id}', ['uses' => 'DocumentsController@download', 'as' => 'reactor.documents.download']);
    Route::get('documents/search', ['uses' => 'DocumentsController@search', 'as' => 'reactor.documents.search']);
    Route::post('documents/search', ['uses' => 'DocumentsController@searchJson', 'as' => 'reactor.documents.search.json']);
    Route::delete('documents/destroy/bulk', ['uses' => 'DocumentsController@bulkDestroy', 'as' => 'reactor.documents.destroy.bulk']);
    Route::get('documents/load', ['uses' => 'DocumentsController@load', 'as' => 'reactor.documents.load']);
    Route::get('documents/retrieve', ['uses' => 'DocumentsController@retrieve', 'as' => 'reactor.documents.retrieve']);
    Route::post('documents/update', ['uses' => 'DocumentsController@updateJson', 'as' => 'reactor.documents.update.json']);
});
Example #24
0
| 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.
|
*/
/*
    //
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
Route::group(['middleware' => ['web']], function () {
    Route::get('/', ['as' => 'home.index', 'uses' => 'HomeController@index']);
    Route::get('about', ['as' => 'about.index', 'uses' => 'AboutController@index']);
    Route::get('posts', ['as' => 'posts.index', 'uses' => 'PostsController@index']);
    Route::get('posts/create', ['as' => 'posts.create', 'uses' => 'PostsController@create']);
    Route::post('posts', ['as' => 'posts.store', 'uses' => 'PostsController@store']);
    Route::get('posts/{id}', ['as' => 'posts.show', 'uses' => 'PostsController@show']);
    Route::get('posts/{id}/edit', ['as' => 'posts.edit', 'uses' => 'PostsController@edit']);
    Route::patch('posts/{id}', ['as' => 'posts.update', 'uses' => 'PostsController@update']);
    Route::delete('posts/{id}', ['as' => 'posts.destroy', 'uses' => 'PostsController@destroy']);
    Route::post('posts/{id}/comment', ['as' => 'posts.comment', function ($id) {
        return 'posts.comment: ' . $id;
    }]);
    Route::get('hot', ['as' => 'posts.hot', 'uses' => 'PostsController@hot']);
    Route::get('random', ['as' => 'posts.random', 'uses' => 'PostsController@random']);
});
Example #25
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('/', 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('/events', 'EventController@index');
Route::get('/events/{key}/{value}', 'EventController@findKeyWord');
Route::post('/event', 'EventController@store');
Route::delete('/event/{event}', 'EventController@destroy');
Example #26
0
    Route::get('/messages/@{username}', ['as' => 'messages.show', 'uses' => 'MessagesController@show']);
    Route::post('/messages/@{username}', ['as' => 'messages.store', 'uses' => 'MessagesController@store']);
    Route::get('/administrator/messages/@{username1}/@{username2}', ['middleware' => ['auth', 'admin:4'], 'as' => 'messages.showadmin', 'uses' => 'MessagesController@showadmin']);
    Route::delete('/messages/{id}', ['as' => 'messages.delete', 'uses' => 'MessagesController@destroy']);
    /**
     * Shouts Controller
     */
    Route::post('/shouts/do', ['as' => 'shouts.store', 'uses' => 'ShoutsController@store']);
    Route::delete('/shouts/{id}/delete', ['as' => 'shouts.delete', 'uses' => 'ShoutsController@destroy']);
    /**
     * Apps Club Controller
     */
    Route::get('/appsclub', ['as' => 'appsclub.index', 'uses' => 'AppsclubController@index']);
    /**
     * Firewall Controller
     */
    Route::get('/firewall', ['middleware' => ['auth', 'admin:3'], 'as' => 'firewall.index', 'uses' => 'FirewallController@index']);
    Route::post('/firewall', ['middleware' => ['auth', 'admin:3'], 'as' => 'firewall.store', 'uses' => 'FirewallController@store']);
    Route::delete('/firewall/{ip}', ['middleware' => ['auth', 'admin:3'], 'as' => 'firewall.destroy', 'uses' => 'FirewallController@destroy']);
});
/**
 * For API Calls and Ajax Search
 *
 * Outside of Web Guard so that escaped by CSRF middleware
 */
Route::get('/inspire', ['as' => 'inspire', 'uses' => 'ApisController@inspire']);
Route::get('/users/{query}', ['as' => 'users.search', 'uses' => 'UsersController@search']);
Route::get('/dyk', ['as' => 'dyk', 'uses' => 'ApisController@didyouknow']);
Route::get('/api/inspire', ['as' => 'api.inspire', 'uses' => 'ApisController@inspireAPI']);
Route::get('/api/users/{query}', ['as' => 'api.users.search', 'uses' => 'UsersController@search']);
Route::get('/api/didyouknow', ['as' => 'api.dyk', 'uses' => 'ApisController@didyouknowAPI']);
Example #27
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('/', function () {
    return view('index');
});
Route::get('/api/v1/pessoas/{id?}', 'Pessoas@index');
Route::post('/api/v1/pessoas', 'Pessoas@store');
Route::post('/api/v1/pessoas/{id}', 'Pessoas@update');
Route::delete('/api/v1/pessoas/{id}', 'Pessoas@destroy');
Example #28
0
Route::get('account', ['as' => 'edit_user_path', 'uses' => 'UsersController@edit', 'middleware' => 'auth']);
Route::post('account', ['as' => 'edit_user_path', 'uses' => 'UsersController@update', 'middleware' => 'auth']);
Route::delete('account', ['as' => 'destroy_user_path', 'uses' => 'UsersController@destroy', 'middleware' => 'auth']);
// Droplets
Route::get('droplets', ['as' => 'droplets_path', 'uses' => 'DropletsController@index', 'middleware' => 'auth']);
Route::get('droplet/create', ['as' => 'create_droplet_path', 'uses' => 'DropletsController@create', 'middleware' => 'auth']);
Route::get('d/{slug}', ['as' => 'droplet_path', 'uses' => 'DropletsController@show']);
Route::post('d/{slug}', ['as' => 'droplet_path', 'uses' => 'DropletsController@handleAuth']);
Route::get('droplet/new/{uploadHash}', ['as' => 'droplet_created_path', 'uses' => 'DropletsController@created']);
Route::get('droplet/{dropletId}', ['as' => 'droplet_files_path', 'uses' => 'DropletsController@files']);
Route::delete('droplet/{dropletId}', ['as' => 'destroy_droplet_path', 'uses' => 'DropletsController@destroy']);
Route::get('droplet/{dropletId}/edit', ['as' => 'edit_droplet_path', 'uses' => 'DropletsController@edit']);
Route::post('droplet/{dropletId}/edit', ['as' => 'edit_droplet_path', 'uses' => 'DropletsController@update']);
Route::get('droplet/{dropletId}/security', ['as' => 'droplet_security_path', 'uses' => 'DropletsController@security']);
Route::post('droplet/{dropletId}/security', ['as' => 'droplet_security_path', 'uses' => 'DropletsController@updateSecurity']);
Route::get('droplet/{dropletId}/share', ['as' => 'droplet_share_path', 'uses' => 'DropletsController@share']);
Route::post('droplet/{dropletId}/share', ['as' => 'droplet_share_path', 'uses' => 'DropletsController@handleShare']);
// Files
Route::post('file', ['as' => 'file_path', 'uses' => 'FilesController@store', 'middleware' => 'auth']);
Route::get('file/download/{crypt}', ['as' => 'download_file_path', 'uses' => 'FilesController@download']);
Route::delete('file/{dropletId}/{fileId}', ['as' => 'destroy_file_path', 'uses' => 'FilesController@destroy']);
// Storage
Route::get('storage', ['as' => 'storage_path', 'uses' => 'StoragesController@index', 'middleware' => 'auth']);
Route::get('storage/oauth/dropbox', ['as' => 'dropbox_oauth_path', 'uses' => 'Oauth\\StorageController@dropbox']);
Route::get('storage/oauth/copy', ['as' => 'copy_oauth_path', 'uses' => 'Oauth\\StorageController@copy']);
Route::get('storage/s3', ['as' => 's3_path', 'uses' => 'StoragesController@s3']);
Route::post('storage/s3', ['as' => 's3_path', 'uses' => 'StoragesController@handleS3']);
Route::delete('storage/{storageId}', ['as' => 'destroy_storage_path', 'uses' => 'StoragesController@destroy', 'middleware' => 'auth']);
Route::get('img/{path}', function (Nimbus\Glide\Server $server, \Illuminate\Http\Request $request) {
    $server->outputImage($request);
})->where('path', '.*');
Example #29
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');
});
Example #30
0
use App\Task;
use Illuminate\Http\Request;
Route::group(['middleware' => ['web']], function () {
    /**
     * Show Task Dashboard
     */
    Route::get('/', function () {
        $tasks = Task::orderBy('created_at', 'asc')->get();
        return view('tasks', ['tasks' => $tasks]);
    });
    /**
     * Add New Task
     */
    Route::post('/task', function (Request $request) {
        $validator = Validator::make($request->all(), ['name' => 'required|max:255']);
        if ($validator->fails()) {
            return redirect('/')->withInput()->withErrors($validator);
        }
        $task = new Task();
        $task->name = $request->name;
        $task->save();
        return redirect('/');
    });
    /**
     * Delete Task
     */
    Route::delete('/task/{task}', function (Task $task) {
        $task->delete();
        return redirect('/');
    });
});