Questions tagged as 'laravel-5.3'

2
answers

Routes Laravel 5.3

Good afternoon people, I noticed that Laravel 5.3 has a new folder "Route", with the routes. By default it uses web.php I would like to know how I can do to create other routes without being inside the web.php, I would like to separate it lik...
asked by 22.09.2016 / 20:33
1
answer

My project Laravel does not go up on the server

I'm following the following online course on youtube: 1 - CRUD in LARAVEL & VUEjs - Webpack, Laravel Mix, NPM, Axios | Rimorsoft Online When I go up the server with the command yarn run dev it gives a success message as you ca...
asked by 05.10.2017 / 12:37
1
answer

htmlspecialchars () expects parameter 1 to be string, object given

I'm trying to make a select button on the blade with @foreach to get the list of all MySql databases. Only @foreach works, I can get the values, but I can not put the bases inside select . It is giving error:    htm...
asked by 26.01.2017 / 14:07
1
answer

Create unique constraint with two fields in Laravel request

I have in the creation migration of my table the following: public function up() { Schema::connection('database2')->create('empresa_funcoes', function(Blueprint $table) { $table->increments('id'); $tab...
asked by 06.10.2016 / 16:49
1
answer

Do a HasMany by date with Laravel 5.3?

Is there any way to do HasMany by bringing records by date? public function despesas() { return $this->hasMany(Despesa::class); //registros apenas desse mês } I tried to use the following but did not scroll: public functio...
asked by 22.11.2016 / 11:38
1
answer

Run a Laravel Schedule every minute?

I'm using Laravel 5.3 and would like to run a task every minute, within the task I'll put some checks, the question is to make it run every minute. I did the following in App \ Kernel: protected function schedule(Schedule $schedule...
asked by 23.11.2016 / 18:07
1
answer

How to access the public directory of Storage in Laravel 5.3?

I need to access saved images in the /storage/app/public directory on views , but I can not, I have a 404 . I'm doing the following: <div class="row"> <img src="../storage/app/public/3.jpg"> </div>...
asked by 16.12.2016 / 13:03
1
answer

What is the difference between @yield and @include in Laravel?

I'm learning Laravel 5.3 , @yield and @include seem to me much the same thing, the only difference I know is that @include injects the variables of parent > and can also include other variables. What is the difference between...
asked by 29.01.2017 / 00:47
2
answers

How do I find out the first or last Loop item in Laravel?

I have the following foreach in Laravel. @foreach($values as $value) <li>{{ $value }}</li> @endforeach I would like to add some special information when it comes to the first item in the loop. In some other template...
asked by 02.09.2016 / 16:57
1
answer

How to do sorting by two parameters with Laravel 5.4?

I am doing a descending order to list winners, however it is based on note. My search is as follows: public function getHistorico($id_avaliacao) { return $this->where('avaliacao_id', $id_avaliacao) ->orderBy('nota', 'des...
asked by 23.02.2017 / 14:30