Esempio n. 1
0
     * Get the data to broadcast.
     *
     * @return array
     */
    public function broadcastWith()
    {
        return ['user' => $this->user->id];
    }
}
get('/broadcast', function () {
    echo \Illuminate\Support\Facades\Hash::make('b1e2r3n4i5');
    event(new TestEvent(Auth::user()));
    //return view('welcome');
});
Route::post('airportajax', function (\Illuminate\Http\Request $request) {
    return \App\Airport::limit(10)->select(['id', 'name'])->search($request->name)->orderBy('name')->get();
});
Route::post('test', function (\Illuminate\Http\Request $request) {
    dd($request->all());
});
// Authentication routes...
Route::get('login', 'Auth\\AuthController@getLogin');
Route::post('login', 'Auth\\AuthController@postLogin');
Route::get('logout', 'Auth\\AuthController@getLogout');
// Registration routes...
Route::get('register', 'Auth\\AuthController@getRegister');
Route::post('register', 'Auth\\AuthController@postRegister');
Route::get('admin', function () {
    return view('admin_template');
});
Route::group(['middleware' => 'auth'], function () {
Esempio n. 2
0
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $airports = Airport::limit(50)->active()->lists('name', 'id');
     return view('template.station.create', ['airports' => $airports]);
 }