public function run() { App\Rol::all()->each(function ($rol) { $rol->save(); $rol->usuarios()->attach(App\Usuario::find(rand(1, 50))); }); }
// Registration routes... Route::get('/registrar', ['uses' => 'Auth\\AuthController@getRegister', 'as' => 'registrar']); Route::post('/registrar', ['uses' => 'Auth\\AuthController@postRegister', 'as' => 'registrar']); //Login routes... Route::get('/login', ['uses' => 'Auth\\AuthController@getLogin', 'as' => 'login']); Route::post('/login', ['uses' => 'Auth\\AuthController@postLogin', 'as' => 'login']); Route::get('/curl', ['uses' => 'HomeController@curl', 'as' => 'curl']); Route::post('/chat/novo', ['uses' => 'ChatController@storeAjax', 'as' => 'novo-chat']); Route::post('/chat/atualiza-mensagens', ['uses' => 'ChatController@getMensagensAjax', 'as' => 'atualiza-mensagens-chat']); Route::post('/chat/envia-mensagem', ['uses' => 'ChatController@updateAjax', 'as' => 'envia-mensagem-chat']); Route::get('/sair', ['uses' => 'Auth\\AuthController@getLogout', 'as' => 'sair']); Route::controllers(['password' => 'Auth\\PasswordController']); Route::get('/ajax/simular-plano/', ['as' => 'ajax-simular-plano', 'uses' => 'PlanoController@simular']); Route::post('/ajax/consulta/', ['as' => 'ajax-simples', 'uses' => 'DashboardController@consultaAjax', 'middleware' => 'auth']); Route::post('/ajax/validar-dependente/', ['as' => 'ajax-validar-dependente', 'uses' => 'FuncionarioController@validateDependente', 'middleware' => 'auth']); Route::post('/ajax/validar-socio/', ['as' => 'ajax-validar-socio', 'uses' => 'AberturaEmpresaController@validateSocio', 'middleware' => 'auth']); Route::post('/ajax/validar-socio-empresa/', ['as' => 'ajax-validar-socio-empresa', 'uses' => 'AberturaEmpresaController@validateSocioEmpresa', 'middleware' => 'auth']); Route::post('/ajax/validar-abertura-empresa/', ['as' => 'ajax-validar-abertura-empresa', 'uses' => 'AberturaEmpresaController@validateAberturaEmpresa', 'middleware' => 'auth']); Route::post('/ajax/cnae/', ['as' => 'ajax-cnae', 'uses' => 'CnaeController@ajax', 'middleware' => 'auth']); Route::post('/ajax/calendar/', ['as' => 'ajax-calendar', 'uses' => 'ImpostoController@ajaxCalendar', 'middleware' => 'auth']); Route::get('/ajax/instrucoes/', ['as' => 'ajax-instrucoes', 'uses' => 'ImpostoController@ajaxInstrucoes', 'middleware' => 'auth']); Route::post('/ajax/notificacoes/', ['as' => 'ajax-notificacao', 'uses' => 'DashboardController@ajaxNotificacao', 'middleware' => 'auth']); Route::post('/ajax/enviar-contato/', ['as' => 'ajax-enviar-contato', 'uses' => 'HomeController@ajaxContato']); Route::get('/ajax/chat-count/', ['as' => 'ajax-chat-count', 'uses' => 'ChatController@ajaxCount']); Route::get('/ajax/chat-notification/', ['as' => 'ajax-chat-notification', 'uses' => 'ChatController@ajaxNotification']); Route::get('/ajax/enviar-contat2o', ['as' => 'ajax2-enviar-contato', 'uses' => function () { $user = App\Usuario::findOrFail(2); Mail::send('emails.novo-usuario', ['nome' => $user->nome], function ($m) use($user) { $m->to($user->email, $user->nome)->subject('Bem Vindo à WEBContabilidade'); }); }]);