mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 04:23:59 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::group(['prefix' => 'account', 'namespace' => 'Account', 'as' => 'account.'], function () {
|
||||
|
||||
Route::group(['namespace' => 'Authentication'], function () {
|
||||
|
||||
Route::group(['prefix' => 'login', 'as' => 'authenticate.'], function () {
|
||||
Route::post('/', 'UserAuthenticationController@authenticate')->name('attempt');
|
||||
Route::post('/check_email', 'CheckEmailController@check')->name('email.check');
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'password', 'as' => 'password.'], function () {
|
||||
Route::post('/forget', 'GeneratePasswordResetController@generate')->name('forget');
|
||||
Route::post('/reset', 'ResetPasswordController@reset')->name('reset');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'user', 'namespace' => 'User', 'as' => 'user.'], function () {
|
||||
Route::get('list', 'ListUsersController@list')->name('list');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register API routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| is assigned the "api" middleware group. Enjoy building your API!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::group(['middleware' => 'api', 'prefix' => 'v1', 'as' => 'api.'], function () {
|
||||
require __DIR__ . '/account.php';
|
||||
|
||||
Route::group(['middleware' => 'valid.token'], function () {
|
||||
require __DIR__ . '/crud.php';
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Broadcast Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may register all of the event broadcasting channels that your
|
||||
| application supports. The given channel authorization callbacks are
|
||||
| used to check if an authenticated user can listen to the channel.
|
||||
|
|
||||
*/
|
||||
|
||||
Broadcast::channel('App.User.{id}', function ($user, $id) {
|
||||
return (int) $user->id === (int) $id;
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is where you may define all of your Closure based console
|
||||
| commands. Each Closure is bound to a command instance allowing a
|
||||
| simple approach to interacting with each command's IO methods.
|
||||
|
|
||||
*/
|
||||
|
||||
Artisan::command('inspire', function () {
|
||||
$this->comment(Inspiring::quote());
|
||||
})->describe('Display an inspiring quote');
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
|
||||
Route::group(['prefix' => 'company', 'as' => 'company.', 'namespace' => 'Companies'], function () {
|
||||
|
||||
Route::get('/{id}/show', 'FetchCompanyController@fetch')->name('show');
|
||||
|
||||
Route::get('/list', 'ListCompaniesController@list')->name('list');
|
||||
|
||||
Route::post('/create', 'CreateCompanyController@create')->name('create');
|
||||
|
||||
Route::put('/update/{id}', 'UpdateCompanyController@update')->name('update');
|
||||
|
||||
Route::delete('/delete/{id}', 'DeleteCompanyController@destroy')->name('delete');
|
||||
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'address', 'as' => 'address.', 'namespace' => 'Addresses'], function () {
|
||||
|
||||
Route::get('/{id}/show', 'FetchAddressController@fetch')->name('show');
|
||||
|
||||
Route::get('/list', 'ListAddressesController@list')->name('list');
|
||||
|
||||
Route::post('/create', 'CreateAddressController@create')->name('create');
|
||||
|
||||
Route::put('/update/{id}', 'UpdateAddressController@update')->name('update');
|
||||
|
||||
Route::delete('/delete/{id}', 'DeleteAddressController@destroy')->name('delete');
|
||||
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'contact', 'as' => 'contact.', 'namespace' => 'Contacts'], function () {
|
||||
|
||||
Route::get('/{id}/show', 'FetchContactController@fetch')->name('show');
|
||||
|
||||
Route::get('/list', 'ListContactsController@list')->name('list');
|
||||
|
||||
Route::post('/create', 'CreateContactController@create')->name('create');
|
||||
|
||||
Route::put('/update/{id}', 'UpdateContactController@update')->name('update');
|
||||
|
||||
Route::delete('/delete/{id}', 'DeleteContactController@destroy')->name('delete');
|
||||
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('', function () {
|
||||
return view('pages.accounts.authentication.login');
|
||||
})->name('login');
|
||||
|
||||
Route::get('account/password/reset/{token}', function ($token){
|
||||
return view('pages.accounts.authentication.reset_password',['token' => $token]);
|
||||
})->name('account.password.reset');
|
||||
|
||||
Route::get('/accounts', function () {
|
||||
return view('pages.accounts.dashboard');
|
||||
})->name('account.dashboard');
|
||||
|
||||
Route::get('/company/{id}/profile', function ($id) {
|
||||
return view('pages.companies.importer_profile', ['id' => (int) $id]);
|
||||
})->name('company.profile');
|
||||
Reference in New Issue
Block a user