pingcrm/routes/web.php

143 lines
4.1 KiB
PHP
Raw Normal View History

2019-03-05 18:10:11 -03:00
<?php
use App\Http\Controllers\Auth\AuthenticatedSessionController;
2020-09-08 19:45:49 -03:00
use App\Http\Controllers\ContactsController;
use App\Http\Controllers\DashboardController;
2020-09-12 08:22:16 -03:00
use App\Http\Controllers\ImagesController;
2020-09-08 19:45:49 -03:00
use App\Http\Controllers\OrganizationsController;
use App\Http\Controllers\ReportsController;
use App\Http\Controllers\UsersController;
2020-07-29 12:07:37 -03:00
use Illuminate\Support\Facades\Route;
2019-03-05 18:10:11 -03:00
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
2019-03-18 08:53:00 -03:00
// Auth
2020-09-08 19:45:49 -03:00
Route::get('login', [AuthenticatedSessionController::class, 'create'])
2020-09-08 19:45:49 -03:00
->name('login')
->middleware('guest');
Route::post('login', [AuthenticatedSessionController::class, 'store'])
->name('login.store')
2020-09-08 19:45:49 -03:00
->middleware('guest');
Route::delete('logout', [AuthenticatedSessionController::class, 'destroy'])
2020-09-08 19:45:49 -03:00
->name('logout');
2019-03-18 08:53:00 -03:00
// Dashboard
2020-09-08 19:45:49 -03:00
Route::get('/', [DashboardController::class, 'index'])
->name('dashboard')
->middleware('auth');
2019-03-18 08:53:00 -03:00
// Users
2020-09-08 19:45:49 -03:00
Route::get('users', [UsersController::class, 'index'])
->name('users')
->middleware('auth');
2020-09-08 19:45:49 -03:00
Route::get('users/create', [UsersController::class, 'create'])
->name('users.create')
->middleware('auth');
Route::post('users', [UsersController::class, 'store'])
->name('users.store')
->middleware('auth');
Route::get('users/{user}/edit', [UsersController::class, 'edit'])
->name('users.edit')
->middleware('auth');
Route::put('users/{user}', [UsersController::class, 'update'])
->name('users.update')
->middleware('auth');
Route::delete('users/{user}', [UsersController::class, 'destroy'])
->name('users.destroy')
->middleware('auth');
Route::put('users/{user}/restore', [UsersController::class, 'restore'])
->name('users.restore')
->middleware('auth');
2019-08-09 12:33:47 -03:00
2019-03-18 08:53:00 -03:00
// Organizations
2020-09-08 19:45:49 -03:00
Route::get('organizations', [OrganizationsController::class, 'index'])
->name('organizations')
->middleware('auth');
2020-09-08 19:45:49 -03:00
Route::get('organizations/create', [OrganizationsController::class, 'create'])
->name('organizations.create')
->middleware('auth');
Route::post('organizations', [OrganizationsController::class, 'store'])
->name('organizations.store')
->middleware('auth');
Route::get('organizations/{organization}/edit', [OrganizationsController::class, 'edit'])
->name('organizations.edit')
->middleware('auth');
Route::put('organizations/{organization}', [OrganizationsController::class, 'update'])
->name('organizations.update')
->middleware('auth');
Route::delete('organizations/{organization}', [OrganizationsController::class, 'destroy'])
->name('organizations.destroy')
->middleware('auth');
Route::put('organizations/{organization}/restore', [OrganizationsController::class, 'restore'])
->name('organizations.restore')
->middleware('auth');
2019-03-18 08:53:00 -03:00
// Contacts
2020-09-08 19:45:49 -03:00
Route::get('contacts', [ContactsController::class, 'index'])
->name('contacts')
->middleware('auth');
2020-09-08 19:45:49 -03:00
Route::get('contacts/create', [ContactsController::class, 'create'])
->name('contacts.create')
->middleware('auth');
Route::post('contacts', [ContactsController::class, 'store'])
->name('contacts.store')
->middleware('auth');
Route::get('contacts/{contact}/edit', [ContactsController::class, 'edit'])
->name('contacts.edit')
->middleware('auth');
Route::put('contacts/{contact}', [ContactsController::class, 'update'])
->name('contacts.update')
->middleware('auth');
Route::delete('contacts/{contact}', [ContactsController::class, 'destroy'])
->name('contacts.destroy')
->middleware('auth');
Route::put('contacts/{contact}/restore', [ContactsController::class, 'restore'])
->name('contacts.restore')
->middleware('auth');
2019-03-18 08:53:00 -03:00
// Reports
2020-09-08 19:45:49 -03:00
Route::get('reports', [ReportsController::class, 'index'])
->name('reports')
->middleware('auth');
// Images
2021-05-10 17:18:33 -03:00
Route::get('/img/{path}', [ImagesController::class, 'show'])
->where('path', '.*')
->name('image');