-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Administration cockpit. Globally accessible and managable configs. Se…
…parated startpage, login and app. Radio got bootstrap outfit, chat area and also information area hinting current streaming state
- Loading branch information
Denis Wentland
committed
Dec 10, 2020
1 parent
ea88b1c
commit bcda347
Showing
44 changed files
with
1,915 additions
and
907 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use App\Model\Config; | ||
use App\Model\User; | ||
use Illuminate\Http\Request; | ||
use Illuminate\Support\Facades\Auth; | ||
use Illuminate\Support\Facades\Redirect; | ||
|
||
class ManagementController extends Controller | ||
{ | ||
/** | ||
* Create a new controller instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
if(Auth::id() !== User::ADMIN_USER_ID) { | ||
// TODO debug blocking | ||
return; | ||
} | ||
|
||
$this->middleware('auth'); | ||
} | ||
|
||
|
||
/** | ||
* Show the application dashboard. | ||
* | ||
* @return \Illuminate\Contracts\Support\Renderable | ||
*/ | ||
public function home() | ||
{ | ||
return view('management.home'); | ||
} | ||
|
||
/** | ||
* church characteristics stipulation | ||
* | ||
* @return \Illuminate\Contracts\Support\Renderable | ||
*/ | ||
public function church(Request $request) | ||
{ | ||
if($request->getMethod() === 'GET') { | ||
return view('management.church'); | ||
} | ||
$request->all(); | ||
dump($request->all()); | ||
$config = Config::where('config','management.church.name')->first(); | ||
if(empty($config)) { | ||
$config = new Config(); | ||
} | ||
$config->config = 'management.church.name'; | ||
$config->value = $request->get('name'); | ||
$config->save(); | ||
|
||
$config = Config::where('config','management.church.street')->first(); | ||
if(empty($config)) { | ||
$config = new Config(); | ||
} | ||
$config->config = 'management.church.street'; | ||
$config->value = $request->get('street'); | ||
$config->save(); | ||
|
||
$config = Config::where('config','management.church.zip')->first(); | ||
if(empty($config)) { | ||
$config = new Config(); | ||
} | ||
$config->config = 'management.church.zip'; | ||
$config->value = $request->get('zip'); | ||
$config->save(); | ||
|
||
$config = Config::where('config','management.church.city')->first(); | ||
if(empty($config)) { | ||
$config = new Config(); | ||
} | ||
|
||
$config->config = 'management.church.city'; | ||
$config->value = $request->get('city'); | ||
$config->save(); | ||
|
||
return Redirect::to('management/church'); | ||
} | ||
|
||
/** | ||
* general app configuration | ||
* | ||
* @return \Illuminate\Contracts\Support\Renderable | ||
*/ | ||
public function general() | ||
{ | ||
return view('management.general'); | ||
} | ||
|
||
/** | ||
* church service lifestream configuration | ||
* | ||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View | ||
*/ | ||
public function videoStreaming() | ||
{ | ||
return view('management.video-streaming'); | ||
} | ||
|
||
/** | ||
* church user management | ||
* | ||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View | ||
*/ | ||
public function user() | ||
{ | ||
return view('management.user'); | ||
} | ||
|
||
/** | ||
* church user management apply settings | ||
*/ | ||
public function userSettings(Request $request) | ||
{ | ||
$name = $request->get('name'); | ||
$streamingVideoType = $request->get('streamingVideoType'); | ||
$request->session()->put('name', $name); | ||
$request->session()->put('streamingVideoType', $streamingVideoType); | ||
|
||
$request->session()->flash('info', 'die Einstellungen wurden übernommen'); | ||
; | ||
return redirect()->to(route('user',__('routes.user'))); | ||
} | ||
|
||
/** | ||
* radio | ||
* | ||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View | ||
*/ | ||
public function radio() | ||
{ | ||
return view('management.radio'); | ||
} | ||
|
||
/** | ||
* library | ||
* | ||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View | ||
*/ | ||
public function library() | ||
{ | ||
return view('management.library'); | ||
} | ||
|
||
/** | ||
* announcements | ||
* | ||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View | ||
*/ | ||
public function announcements() | ||
{ | ||
|
||
return view('management.announcements'); | ||
} | ||
|
||
/** | ||
* chat | ||
* | ||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View | ||
*/ | ||
public function chat(Request $request) | ||
{ | ||
|
||
return view('management.chat'); | ||
} | ||
|
||
/** | ||
* recordings | ||
* | ||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View | ||
*/ | ||
public function recordings() | ||
{ | ||
return view('management.recordings'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace App\Model; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
class Config extends Model | ||
{ | ||
protected $table = "config"; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.