/**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $routeName = 'settings';
     $routeMethod = 'index';
     $settings = $this->setting->getAllByGroupOrdered();
     $data = compact('routeName', 'routeMethod', 'settings');
     \Clockwork::info($settings);
     return view('admin.sections.settings.index', $data);
 }
Пример #2
0
 /**
  * Display the specified resource.
  *
  * @param  int  $hash
  * @return \Illuminate\Http\Response
  */
 public function show($hash, Request $request)
 {
     $routeName = 'map';
     $routeMethod = 'show';
     $map = $this->map->getByHash($hash);
     if (!$map) {
         $data = compact('routeName', 'routeMethod');
         return view('public.sections.map.unavailable', $data);
     }
     if ($request->input('redirect') == null) {
         if (Auth::check()) {
             return redirect()->route('admin.map.show', $map->id);
         }
     }
     $this->map->countView($map);
     $environment = collect(['settings' => \Cache::get('settings')]);
     $data = compact('routeName', 'routeMethod', 'map', 'environment');
     \Clockwork::info($map);
     return view('public.sections.map.show', $data);
 }
Пример #3
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $routeName = 'role';
     $routeMethod = 'edit';
     $role = $this->role->getById($id);
     $permissions = $this->permission->getAllOrderedBy('name');
     $data = compact('routeName', 'routeMethod', 'role', 'permissions');
     \Clockwork::info($permissions);
     return view('admin.sections.role.edit', $data);
 }
Пример #4
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit(TagRepository $tag, SourceRepository $source, $id)
 {
     $routeName = 'map';
     $routeMethod = 'edit';
     $map = $this->map->getById($id);
     if (!$map) {
         return redirect()->route('admin.map.index');
     }
     $tags = $tag->getAllOrderedBy('name');
     $sources = $source->getAllOrderedBy('name');
     $environment = collect(['settings' => \Cache::get('settings')]);
     $environment = $environment->toJSON();
     $data = compact('routeName', 'routeMethod', 'map', 'tags', 'sources', 'environment');
     \Clockwork::info($data);
     return view('admin.sections.map.edit', $data);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $routeName = 'permission';
     $routeMethod = 'edit';
     $permission = $this->permission->getById($id);
     $data = compact('routeName', 'routeMethod', 'permission');
     \Clockwork::info($permission);
     return view('admin.sections.permission.edit', $data);
 }
Пример #6
0
$app->group(['middleware' => 'csrf'], function () use($app) {
    $app->post('auth/register', ['as' => 'auth.register', 'uses' => \App\Http\Controllers\Register::class . '@register']);
    $app->post('auth/change-lost-password', ['as' => 'auth.changeLostPassword', 'uses' => \App\Http\Controllers\Password::class . '@changeLostPassword']);
    $app->post('auth/lost-password', ['as' => 'auth.lostPassword', 'uses' => \App\Http\Controllers\Password::class . '@lostPassword']);
    $app->post('auth/login', ['as' => 'auth.login', 'uses' => \App\Http\Controllers\Auth::class . '@login']);
    $app->get('oauth/google/connect', ['as' => 'oauth.google.connect', 'uses' => \App\Http\Controllers\OAuth\Google::class . '@connect']);
    $app->get('oauth/google/callback', ['as' => 'oauth.google.callback', 'uses' => \App\Http\Controllers\OAuth\Google::class . '@callback']);
});
$app->group(['middleware' => 'auth|csrf'], function () use($app) {
    $app->get('auth/logout', ['as' => 'auth.logout', 'uses' => \App\Http\Controllers\Auth::class . '@logout']);
    $app->get('/', function () use($app) {
        Clockwork::info('Message text.');
        // 'Message text.' appears in Clockwork log tab
        Log::info('Lumen logger interface.');
        // 'Message text.' appears in Clockwork log tab as well as application log file
        Clockwork::info(array('hello' => 'world'));
        // logs json representation of the array
        return view('index');
    });
    $app->get('/acl', ['middleware' => 'acl:test.test', 'as' => 'acl.test', function () {
        dd('OK');
    }]);
});
/*
|--------------------------------------------------------------------------
| API
|--------------------------------------------------------------------------
*/
$app->group(['prefix' => 'api/v1', 'middleware' => 'cors'], function () use($app) {
    $app->post('oauth/access_token', ['as' => 'oauth.login', 'uses' => App\Http\Controllers\Api\Auth::class . '@login']);
    $app->group(['middleware' => 'cors|oauth', 'prefix' => 'api/v1'], function () use($app) {
Пример #7
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $routeName = 'source';
     $routeMethod = 'edit';
     $source = $this->source->getById($id);
     $data = compact('routeName', 'routeMethod', 'source');
     \Clockwork::info($source);
     return view('admin.sections.source.edit', $data);
 }
Пример #8
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $routeName = 'user';
     $routeMethod = 'edit';
     $user = $this->user->getById($id);
     $roles = $this->role->getAllOrderedBy('name');
     $data = compact('routeName', 'routeMethod', 'user', 'roles');
     \Clockwork::info($user);
     return view('admin.sections.user.edit', $data);
 }