Questions tagged as 'laravel-5'

1
answer

Laravel 5.2 - validation rule does not work

I need to validate a zip field, but the following attempts do not work: $rules= ['cep' => 'required|numeric|size:8']; ou $rules= ['cep' => 'required|numeric|min:8']; ou $rules= ['cep' => 'numeric|size:8']; The following validati...
asked by 05.09.2016 / 21:12
1
answer

Error Sorry, the page you are looking for could not be found. in laravel

I have a problem with this site it appears this error on the screen when I try to access it what can be this error how do i fix it. My routes: <?php /* |-------------------------------------------------------------------------- | Ap...
asked by 02.12.2016 / 16:43
2
answers

Laravel 5.3: Jump of auto_increment (id) (Gaps)

I did a basic CRUD using Eloquent. My problem is when it's time to create. I use the code below: public function store(Request $request) { $subscription = new Subscription; // Basic Data $subscription->custom_id = '10001';...
asked by 30.11.2016 / 19:16
1
answer

How to format monetary value in Laravel

I would like to know how to format monetary values in Laravel. Is there a package or method that is for the framework ? {{ $lst->vl_valor_tot_c‌​ontrato }} is displayed with monetary formatting like this: (R$ 105.273,54)   ...
asked by 16.08.2016 / 19:39
1
answer

Laravel x Cakephp

I'm starting in Laravel (5.x), but I have years experience in Cakephp and would like to solve some doubts, since I did not find something like this on the Internet: 1) I can only create models, controllers and the like by the command of Artis...
asked by 31.07.2016 / 02:19
1
answer

What is the best way to query a user's data in Laravel?

When displaying multiple data from a user in a view, is it best to do it in a way? Option 1 (pass data to the view): $usuario = Auth::user(); return view('painel.usuarios.perfil', compact('usuario')); Option 2 (directly in the view): A...
asked by 07.11.2016 / 18:04
1
answer

Delete Directory Image - Laravel 5.1

I have the following code in my destroy method: try{ Tecnico::find($id_tecnico)->delete(); DB::commit(); return Redirect::back()->with('message', true); }catch (\Exception $e){ DB::rollback(); return $this->ren...
asked by 13.04.2016 / 20:48
2
answers

Problem with Routes Laravel 5

I've arranged my Controllers for folders: Ex: Panel / Concessionaire / Trademarks - > CarrosController.php On Route I tried to report this way Route::get('Painel\Concessesionaria\Marcas', ['as' => 'marcas', function () { Route::get...
asked by 28.04.2016 / 22:47
1
answer

Laravel 5 mail format html with css

I'm sending an email through Mail of laravel 5 $data = Input::all(); Mail::send('mails.sendteste', $data, function ($message) { $message->from('[email protected]', 'Sistema'); $message->subject...
asked by 30.03.2016 / 15:44
1
answer

How to use the "sync" of Laravel 5.1?

Recently I discovered a feature of eloquent called sync , vi that it sort of compares the data passed with the data that is in the database and deletes or inserts what has different. I wanted to implement this in my application, but...
asked by 25.01.2016 / 14:24