From 5269a15bcffe0a5084092fc61f445c0bee588baa Mon Sep 17 00:00:00 2001 From: Horus Date: Thu, 14 Jan 2021 12:09:03 +0100 Subject: Delete Laravel app. --- app/Console/Kernel.php | 42 ------- app/Exceptions/Handler.php | 55 ---------- .../Controllers/Auth/ConfirmPasswordController.php | 40 ------- .../Controllers/Auth/ForgotPasswordController.php | 22 ---- app/Http/Controllers/Auth/LoginController.php | 40 ------- app/Http/Controllers/Auth/RegisterController.php | 73 ------------ .../Controllers/Auth/ResetPasswordController.php | 30 ----- .../Controllers/Auth/VerificationController.php | 42 ------- app/Http/Controllers/Controller.php | 13 --- app/Http/Controllers/HomeController.php | 28 ----- app/Http/Controllers/IndexController.php | 18 --- app/Http/Controllers/iCalController.php | 56 ---------- app/Http/Kernel.php | 82 -------------- app/Http/Middleware/Authenticate.php | 21 ---- app/Http/Middleware/CheckForMaintenanceMode.php | 17 --- app/Http/Middleware/EncryptCookies.php | 17 --- app/Http/Middleware/RedirectIfAuthenticated.php | 27 ----- app/Http/Middleware/TrimStrings.php | 18 --- app/Http/Middleware/TrustProxies.php | 23 ---- app/Http/Middleware/VerifyCsrfToken.php | 24 ---- app/Libraries/Zeitumstellung.php | 122 --------------------- app/Providers/AppServiceProvider.php | 28 ----- app/Providers/AuthServiceProvider.php | 30 ----- app/Providers/BroadcastServiceProvider.php | 21 ---- app/Providers/EventServiceProvider.php | 34 ------ app/Providers/RouteServiceProvider.php | 80 -------------- app/User.php | 39 ------- 27 files changed, 1042 deletions(-) delete mode 100644 app/Console/Kernel.php delete mode 100644 app/Exceptions/Handler.php delete mode 100644 app/Http/Controllers/Auth/ConfirmPasswordController.php delete mode 100644 app/Http/Controllers/Auth/ForgotPasswordController.php delete mode 100644 app/Http/Controllers/Auth/LoginController.php delete mode 100644 app/Http/Controllers/Auth/RegisterController.php delete mode 100644 app/Http/Controllers/Auth/ResetPasswordController.php delete mode 100644 app/Http/Controllers/Auth/VerificationController.php delete mode 100644 app/Http/Controllers/Controller.php delete mode 100644 app/Http/Controllers/HomeController.php delete mode 100644 app/Http/Controllers/IndexController.php delete mode 100644 app/Http/Controllers/iCalController.php delete mode 100644 app/Http/Kernel.php delete mode 100644 app/Http/Middleware/Authenticate.php delete mode 100644 app/Http/Middleware/CheckForMaintenanceMode.php delete mode 100644 app/Http/Middleware/EncryptCookies.php delete mode 100644 app/Http/Middleware/RedirectIfAuthenticated.php delete mode 100644 app/Http/Middleware/TrimStrings.php delete mode 100644 app/Http/Middleware/TrustProxies.php delete mode 100644 app/Http/Middleware/VerifyCsrfToken.php delete mode 100644 app/Libraries/Zeitumstellung.php delete mode 100644 app/Providers/AppServiceProvider.php delete mode 100644 app/Providers/AuthServiceProvider.php delete mode 100644 app/Providers/BroadcastServiceProvider.php delete mode 100644 app/Providers/EventServiceProvider.php delete mode 100644 app/Providers/RouteServiceProvider.php delete mode 100644 app/User.php (limited to 'app') diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php deleted file mode 100644 index a8c5158..0000000 --- a/app/Console/Kernel.php +++ /dev/null @@ -1,42 +0,0 @@ -command('inspire') - // ->hourly(); - } - - /** - * Register the commands for the application. - * - * @return void - */ - protected function commands() - { - $this->load(__DIR__.'/Commands'); - - require base_path('routes/console.php'); - } -} diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php deleted file mode 100644 index 364621e..0000000 --- a/app/Exceptions/Handler.php +++ /dev/null @@ -1,55 +0,0 @@ -middleware('auth'); - } -} diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php deleted file mode 100644 index 465c39c..0000000 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ /dev/null @@ -1,22 +0,0 @@ -middleware('guest')->except('logout'); - } -} diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php deleted file mode 100644 index c6a6de6..0000000 --- a/app/Http/Controllers/Auth/RegisterController.php +++ /dev/null @@ -1,73 +0,0 @@ -middleware('guest'); - } - - /** - * Get a validator for an incoming registration request. - * - * @param array $data - * @return \Illuminate\Contracts\Validation\Validator - */ - protected function validator(array $data) - { - return Validator::make($data, [ - 'name' => ['required', 'string', 'max:255'], - 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], - 'password' => ['required', 'string', 'min:8', 'confirmed'], - ]); - } - - /** - * Create a new user instance after a valid registration. - * - * @param array $data - * @return \App\User - */ - protected function create(array $data) - { - return User::create([ - 'name' => $data['name'], - 'email' => $data['email'], - 'password' => Hash::make($data['password']), - ]); - } -} diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php deleted file mode 100644 index b1726a3..0000000 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ /dev/null @@ -1,30 +0,0 @@ -middleware('auth'); - $this->middleware('signed')->only('verify'); - $this->middleware('throttle:6,1')->only('verify', 'resend'); - } -} diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php deleted file mode 100644 index a0a2a8a..0000000 --- a/app/Http/Controllers/Controller.php +++ /dev/null @@ -1,13 +0,0 @@ -middleware('auth'); - } - - /** - * Show the application dashboard. - * - * @return \Illuminate\Contracts\Support\Renderable - */ - public function index() - { - return view('home'); - } -} diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/IndexController.php deleted file mode 100644 index 629f756..0000000 --- a/app/Http/Controllers/IndexController.php +++ /dev/null @@ -1,18 +0,0 @@ - $tc ]); - } -} diff --git a/app/Http/Controllers/iCalController.php b/app/Http/Controllers/iCalController.php deleted file mode 100644 index f41f322..0000000 --- a/app/Http/Controllers/iCalController.php +++ /dev/null @@ -1,56 +0,0 @@ -setName('Zeitumstellung'); - $vCalendar->setTimezone('Europe/Berlin'); - - $tc = new Zeitumstellung(); - - for ( $i= 0; $i<3; $i++ ) { - - $vEvent = new Event(); - $vEvent - ->setDtStart(new \DateTime($tc->dateText)) - ->setDtEnd(new \DateTime($tc->dateText)) - ->setNoTime(true) - ->setSummary('Zeitumstellung') - ->setUrl( env("APP_URL") ) - ->setDescription($tc->description) - ->setDescriptionHTML($tc->descriptionHTML); - - $vCalendar->addComponent($vEvent); - - $tc = $tc->next(); - } - - header('Content-Type: text/calendar; charset=utf-8'); - - if ( '0' != $request->input('download') ) { - header('Content-Disposition: attachment; filename="zeitumstellung.ics"'); - } - - echo $vCalendar->render(); - } - - public function showPage(Request $request) { - return view('index'); - } -} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php deleted file mode 100644 index deb65e8..0000000 --- a/app/Http/Kernel.php +++ /dev/null @@ -1,82 +0,0 @@ - [ - \App\Http\Middleware\EncryptCookies::class, - \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, - \Illuminate\Session\Middleware\StartSession::class, - // \Illuminate\Session\Middleware\AuthenticateSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\VerifyCsrfToken::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - ], - - 'api' => [ - 'throttle:60,1', - \Illuminate\Routing\Middleware\SubstituteBindings::class, - ], - ]; - - /** - * The application's route middleware. - * - * These middleware may be assigned to groups or used individually. - * - * @var array - */ - protected $routeMiddleware = [ - 'auth' => \App\Http\Middleware\Authenticate::class, - 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, - 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, - 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, - 'can' => \Illuminate\Auth\Middleware\Authorize::class, - 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, - 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, - 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, - 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, - 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, - ]; - - /** - * The priority-sorted list of middleware. - * - * This forces non-global middleware to always be in the given order. - * - * @var array - */ - protected $middlewarePriority = [ - \Illuminate\Session\Middleware\StartSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\Authenticate::class, - \Illuminate\Routing\Middleware\ThrottleRequests::class, - \Illuminate\Session\Middleware\AuthenticateSession::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - \Illuminate\Auth\Middleware\Authorize::class, - ]; -} diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php deleted file mode 100644 index 704089a..0000000 --- a/app/Http/Middleware/Authenticate.php +++ /dev/null @@ -1,21 +0,0 @@ -expectsJson()) { - return route('login'); - } - } -} diff --git a/app/Http/Middleware/CheckForMaintenanceMode.php b/app/Http/Middleware/CheckForMaintenanceMode.php deleted file mode 100644 index 35b9824..0000000 --- a/app/Http/Middleware/CheckForMaintenanceMode.php +++ /dev/null @@ -1,17 +0,0 @@ -check()) { - return redirect(RouteServiceProvider::HOME); - } - - return $next($request); - } -} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php deleted file mode 100644 index 5a50e7b..0000000 --- a/app/Http/Middleware/TrimStrings.php +++ /dev/null @@ -1,18 +0,0 @@ -now = Carbon::now()->startOfDay(); - } else { - $this->now = $setNow; - } - - $this->year = $this->now->year; - - # detect if next time change is next year - if ( $this->now->gt( Carbon::parse('last sunday of october')->startOfDay() ) ){ - $this->year = $this->year+1; - } - - $this->tc_march = Carbon::parse('last sunday of march ' . $this->year )->startOfDay(); - $this->tc_oct = Carbon::parse('last sunday of october ' . $this->year)->startOfDay(); - - if ( $this->now->lte($this->tc_march) ){ - # next time change is in march this year, (last sunday in march) - - $this->season = "Sommerzeit"; - - $this->date = $this->tc_march; - $this->description = 'Die Uhr wird von 2 Uhr auf 3 Uhr vorgestellt, sodass wir 1 Stunde weniger schlafen.'; - $this->descriptionHTML = 'Die Uhr wird von 2 Uhr auf 3 Uhr vorgestellt, sodass wir 1 Stunde weniger schlafen.'; - - # detect if last time change was last year - if ( $this->now->lt( Carbon::parse('last sunday of march ') ) ) { - #$this->year = $this->now->year - 1; - $year = $this->now->year - 1; - $this->daysago = Carbon::parse('last sunday of october' . $year)->diffInDays( $this->now ); - } else { - $this->daysago = $this->tc_oct->diffInDays( $this->now ); - } - - } else { - # next time change is in october this year, (last sunday in october) - - $this->season = "Winterzeit"; - - $this->date = $this->tc_oct; - $this->description = 'Die Uhr wird von 3 Uhr auf 2 Uhr zurückgestellt, sodass wir 1 Stunde länger schlafen.'; - $this->descriptionHTML = 'Die Uhr wird von 3 Uhr auf 2 Uhr zurückgestellt, sodass wir 1 Stunde länger schlafen.'; - - $this->daysago = $this->tc_march->diffInDays( $this->now ); - } - - $this->dateText = $this->date->toDateString(); - - $this->daysuntil = $this->date->diffInDays($this->now); - - $this->day = $this->date->day; - $this->month = $this->date->month; - $this->year = $this->date->year; - - if ( 3 == $this->month ) { - $this->monthText = "März"; - } else { - $this->monthText = "Oktober"; - } - } - - /** - * Returns an instance of the object with the next time change after the current one. - */ - function next(){ - return new Zeitumstellung( $this->date->add(1, 'day') ); - } - - public function getData(){ - $result = array(); - - $result["date"] = $this->date->toDateString(); - $result["day"] = $this->date->day; - $result["month"] = $this->date->month; - $result["monthText"] = $this->monthText; - $result["year"] = $this->date->year; - $result["daysuntil"] = $this->daysuntil; - $result["daysago"] = $this->daysago; - $result["now"] = $this->now->toDateString(); - - return $result; - } - public function getJSON(){ - return json_encode( $this->getData() ); - } -} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php deleted file mode 100644 index ee8ca5b..0000000 --- a/app/Providers/AppServiceProvider.php +++ /dev/null @@ -1,28 +0,0 @@ - 'App\Policies\ModelPolicy', - ]; - - /** - * Register any authentication / authorization services. - * - * @return void - */ - public function boot() - { - $this->registerPolicies(); - - // - } -} diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php deleted file mode 100644 index 395c518..0000000 --- a/app/Providers/BroadcastServiceProvider.php +++ /dev/null @@ -1,21 +0,0 @@ - [ - SendEmailVerificationNotification::class, - ], - ]; - - /** - * Register any events for your application. - * - * @return void - */ - public function boot() - { - parent::boot(); - - // - } -} diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php deleted file mode 100644 index 527eee3..0000000 --- a/app/Providers/RouteServiceProvider.php +++ /dev/null @@ -1,80 +0,0 @@ -mapApiRoutes(); - - $this->mapWebRoutes(); - - // - } - - /** - * Define the "web" routes for the application. - * - * These routes all receive session state, CSRF protection, etc. - * - * @return void - */ - protected function mapWebRoutes() - { - Route::middleware('web') - ->namespace($this->namespace) - ->group(base_path('routes/web.php')); - } - - /** - * Define the "api" routes for the application. - * - * These routes are typically stateless. - * - * @return void - */ - protected function mapApiRoutes() - { - Route::prefix('api') - ->middleware('api') - ->namespace($this->namespace) - ->group(base_path('routes/api.php')); - } -} diff --git a/app/User.php b/app/User.php deleted file mode 100644 index e79dab7..0000000 --- a/app/User.php +++ /dev/null @@ -1,39 +0,0 @@ - 'datetime', - ]; -} -- cgit v1.2.3