First Commit
This commit is contained in:
commit
610aa1e202
4204 changed files with 636764 additions and 0 deletions
18
routes/api.php
Executable file
18
routes/api.php
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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::middleware('auth:api')->get('/user', function (Request $request) {
|
||||
return $request->user();
|
||||
});
|
||||
16
routes/channels.php
Executable file
16
routes/channels.php
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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;
|
||||
});
|
||||
18
routes/console.php
Executable file
18
routes/console.php
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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');
|
||||
166
routes/web.php
Executable file
166
routes/web.php
Executable file
|
|
@ -0,0 +1,166 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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!
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
Auth::routes();
|
||||
|
||||
Route::get('/logout', function(){
|
||||
Auth::logout();
|
||||
return Redirect::to('login');
|
||||
})->name('logout');
|
||||
|
||||
|
||||
Route::get('locale/{locale}', function ($locale) {
|
||||
\Session::put('locale', $locale);
|
||||
if(Auth::check()){
|
||||
$user = Auth::user();
|
||||
$user->lang = $locale;
|
||||
$user->save();
|
||||
}
|
||||
return redirect()->back();
|
||||
})->name('locale');
|
||||
/*
|
||||
|
||||
//Route::get('/', 'HomeController@index')->name('/');
|
||||
|
||||
/*Route::post('/register/data', 'HomeController@register')->name('register_data');
|
||||
Route::post('/user/check/mail', 'HomeController@checkMail')->name('user_check_mail');
|
||||
|
||||
Route::get('/register/verify/{confirmationCode}', 'HomeController@verify')->name('register_verify');
|
||||
|
||||
Route::get('/status/register', 'HomeController@statusRegister')->name('status_register');
|
||||
Route::get('/status/verify', 'HomeController@statusVerify')->name('status_verify');
|
||||
Route::get('/status/error', 'HomeController@statusError')->name('status_error');
|
||||
|
||||
|
||||
Route::get('/user/update_email_confirm/{token}', 'UpdateEmailController@activateMail')->name('user_update_email_confirm');
|
||||
*/
|
||||
|
||||
Route::get('/data_protected', 'HomeController@legalDataProtected')->name('data_protected');
|
||||
Route::get('/imprint', 'HomeController@legalImprint')->name('imprint');
|
||||
Route::post('/loading/modal', 'HomeController@loadingModal')->name('loading_modal');
|
||||
Route::get('/', 'HomeController@index')->name('home');
|
||||
Route::get('/user/update_email_confirm/{token}', 'UserUpdateEmailController@activateMail')->name('user_update_email_confirm');
|
||||
|
||||
|
||||
Route::group(['middleware' => ['auth']], function()
|
||||
{
|
||||
|
||||
Route::get('storage/{type?}/{file?}', function($type = null, $file = null)
|
||||
{
|
||||
if($type == 'xls'){
|
||||
$path = storage_path("app/export/");
|
||||
$filename = $file.'.xls';
|
||||
}
|
||||
|
||||
if (file_exists($path.$filename)) {
|
||||
return Response::download($path.$filename, $filename);
|
||||
}
|
||||
})->name('storage');
|
||||
|
||||
Route::get('/home', 'HomeController@show')->name('home');
|
||||
|
||||
|
||||
/* Route::get('/user/edit', 'UserController@userEdit')->name('user_edit');
|
||||
|
||||
*/
|
||||
Route::get('/user/edit', 'UserDataController@userEdit')->name('user_edit');
|
||||
Route::post('/user/edit', 'UserDataController@userEditStore')->name('user_edit');
|
||||
|
||||
|
||||
Route::get('/user/update_password', 'UserUpdatePasswordController@updatePassword')->name('user_update_password');
|
||||
Route::post('/user/update_password', 'UserUpdatePasswordController@updatePasswordStore')->name('user_update_password');
|
||||
|
||||
Route::get('/user/update_password_first', 'UserUpdatePasswordController@updatePasswordFirst')->name('user_update_password_first');
|
||||
Route::post('/user/update_password_first', 'UserUpdatePasswordController@updatePasswordFirstStore')->name('user_update_password_first');
|
||||
|
||||
Route::get('/user/update_email', 'UserUpdateEmailController@index')->name('user_update_email');
|
||||
Route::post('/user/update_email', 'UserUpdateEmailController@update')->name('user_update_email');
|
||||
|
||||
Route::get('/user/delete_account', 'UserDeleteController@deleteAccount')->name('user_delete_account');
|
||||
Route::post('/user/delete_account', 'UserDeleteController@deleteAccountAction')->name('user_delete_account');
|
||||
|
||||
Route::post('/user/data/accepted/form', 'UserDataController@userDataAcceptedForm')->name('user_data_accepted_form');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
Route::group(['middleware' => ['admin']], function()
|
||||
{
|
||||
|
||||
|
||||
});
|
||||
|
||||
//login pages for worker
|
||||
Route::group(['middleware' => ['superadmin']], function() {
|
||||
//leads
|
||||
Route::get('/admin/users', 'AdminUserController@index')->name('admin_users');
|
||||
Route::get('/admin/user/edit/{user_id}', 'AdminUserController@edit')->name('admin_user_edit');
|
||||
Route::post('/admin/user/store', 'AdminUserController@store')->name('admin_user_store');
|
||||
Route::get('/admin/user/delete/{user_id}', 'AdminUserController@deleteUser')->name('admin_user_delete');
|
||||
|
||||
Route::get('data_table', 'DataTableController@datatable')->name('data_table');
|
||||
// Route::get('datatables/leads', 'DataTableController@getLeads')->name('datatables-leads');
|
||||
Route::get('data/table/users', 'DataTableController@getUsers')->name('data_table_users');
|
||||
|
||||
|
||||
Route::get('/admin/translate', 'TranslationController@index')->name('admin_translate');
|
||||
Route::get('/admin/translate/edit/{lang}/{from?}', 'TranslationController@edit')->name('admin_translate_edit');
|
||||
Route::post('/admin/translate/update/{lang}/{from?}', 'TranslationController@update')->name('admin_translate_update');
|
||||
|
||||
});
|
||||
|
||||
Route::get('storage/{what}/{path}/{id}/{file_name}', function($what = null, $path = null, $id = null, $file_name = null)
|
||||
{
|
||||
$path = storage_path().'/app/'.$path.'/'.$id.'/images/'.$what.'/'.$file_name;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
});
|
||||
|
||||
Route::get('storage/{user_id}/{file_name}', function($user_id = null, $file_name = null)
|
||||
{
|
||||
$path = storage_path().'/'.'app'.'/user/' . $user_id . '/verification/' . $file_name;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
});
|
||||
/*
|
||||
use App\Mail\MailResetPassword;
|
||||
|
||||
Route::get('/send_test_email', function(){
|
||||
|
||||
try {
|
||||
// Mail::to('kevin.adametz@me.com')->send(new MailResetPassword('asdasd', Auth::user()));
|
||||
|
||||
Mail::raw('Sending emails with Mailgun and Laravel is easy!', function($message) {
|
||||
$message->to('kevin.adametz@me.com', 'Kevin Adametz');
|
||||
$message->subject('testing Networktrips');
|
||||
});
|
||||
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
dd($e->getMessage());
|
||||
}
|
||||
|
||||
$fail = Mail::failures();
|
||||
|
||||
if(!empty($fail)) throw new \Exception('Could not send message to '.$fail[0]);
|
||||
|
||||
});
|
||||
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue