- Complete GGZ Ecademy Laravel backend application - RESTful API for learning products, members, filters - Authentication and authorization system - Database migrations and seeders - Custom CRUD generator commands - Email notification system - Integration with frontend applications
This commit is contained in:
81
routes/api.php
Normal file
81
routes/api.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
# Auth Routes
|
||||
Route::prefix('auth')->group(function () {
|
||||
Route::post('login', 'AuthController@login');
|
||||
Route::get('user', 'AuthController@me');
|
||||
Route::post('logout', 'AuthController@logout');
|
||||
|
||||
Route::get('status', 'AuthController@status');
|
||||
|
||||
Route::post('password/email', 'ForgotPasswordController@sendResetLinkEmail');
|
||||
Route::post('password/reset', 'ResetPasswordController@reset');
|
||||
|
||||
// Not Implemented yet
|
||||
// Route::post('refresh', 'AuthController@refresh');
|
||||
// Route::post('signup', 'AuthController@signup');
|
||||
|
||||
# SSO
|
||||
Route::get('sso', 'AuthController@sso');
|
||||
Route::get('ssoData', 'AuthController@get_sso_data');
|
||||
});
|
||||
|
||||
# Admin Routes
|
||||
Route::prefix('admin')->name('admin.')->group(function () {
|
||||
Route::get('users/getList', 'UserController@getList');
|
||||
Route::resource('users', 'UserController', ['only' => ['index', 'show', 'store', 'destroy']]);
|
||||
});
|
||||
|
||||
# Notifications
|
||||
Route::post('notifications/mark-as-read', 'NotificationController@markAsRead');
|
||||
Route::post('notifications/delete', 'NotificationController@delete');
|
||||
Route::post('notifications/test', 'NotificationController@test');
|
||||
|
||||
Route::get('notifications/test-mail-notifications', 'CourseNotificationController@testCommand');
|
||||
|
||||
# Roles
|
||||
Route::resource('roles', 'RoleController', ['only' => ['index']]);
|
||||
|
||||
# Learning
|
||||
Route::get('learning-products/count', 'LearningProductController@countAll');
|
||||
Route::get('learning-products/published', 'LearningProductController@getPublished');
|
||||
Route::post('learning-products/clone', 'LearningProductController@clone');
|
||||
Route::resource('learning-products', 'LearningProductController', ['only' => ['index', 'show', 'store', 'destroy']]);
|
||||
|
||||
Route::resource('accreditations', 'AccreditationController');
|
||||
Route::resource('learning-products/notifications', 'CourseNotificationController');
|
||||
Route::resource('versions', 'VersionController');
|
||||
|
||||
Route::resource('checklist-categories', 'ChecklistCategoryController');
|
||||
Route::resource('checklists', 'ChecklistController');
|
||||
|
||||
# Filters
|
||||
Route::get('filters-with-count', 'FilterController@indexWithCount');
|
||||
Route::resource('filters', 'FilterController');
|
||||
Route::resource('filter-items', 'FilterItemController');
|
||||
|
||||
# Synonyms
|
||||
Route::resource('synonyms', 'SynonymController');
|
||||
|
||||
# Members
|
||||
Route::get('members/count', 'MemberController@countAll');
|
||||
Route::get('members/types', 'TypeController@index');
|
||||
Route::resource('members/addresses', 'AddressController');
|
||||
Route::resource('members/summaries', 'SummaryController');
|
||||
Route::resource('members/contacts', 'ContactController');
|
||||
Route::resource('members/branches', 'BranchController');
|
||||
Route::post('members/revision', 'MemberController@storeMemberRevision');
|
||||
Route::resource('members', 'MemberController');
|
||||
Route::post('members/managementlink/addlink', 'ManagementLinkController@storeManagementLink');
|
||||
Route::post('members/managementlink/changelink', 'ManagementLinkController@changeManagementLink');
|
||||
Route::post('members/managementlink/deletelink', 'ManagementLinkController@destroy');
|
||||
Route::resource('members/contributions', 'ContributionController');
|
||||
|
||||
# Testing
|
||||
// Route::get('test', function () { // });
|
||||
Route::get('download-csv', 'CsvExportController@downloadCSV');
|
||||
|
||||
# Meta
|
||||
Route::get('ping', 'PingController@index');
|
||||
18
routes/channels.php
Normal file
18
routes/channels.php
Normal file
@@ -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.Repositories.User.{id}', function ($user, $id) {
|
||||
return (int) $user->id === (int) $id;
|
||||
});
|
||||
19
routes/console.php
Normal file
19
routes/console.php
Normal file
@@ -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');
|
||||
4
routes/web.php
Normal file
4
routes/web.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
// use Illuminate\Support\Facades\Route;
|
||||
// Route::get('/', function () { return view('welcome'); });
|
||||
Reference in New Issue
Block a user