Questions tagged as 'laravel'

0
answers

How to get around the facades of laravel?

I see many people saying that it is unproductive to always depend on the facades, the one used for DB query eg DB :: something. What is the best way to use to not lose performance?     
asked by 16.05.2018 / 15:31
2
answers

Eloquent Laravel - Column user_id

Hello, I'm learning laravel and I do not find this in any forum. I have some tables that have a foreign key called 'user_id', but when I save an object in the database I always have to fill that column. Is there a way to do this? I want to be ab...
asked by 08.05.2018 / 03:36
1
answer

Authentication on laravel API routes

I'm running some tests on building an API with Laravel. All the URLs of the API are currently accessing without authentication. I am trying to allow after user authentication. In routes / api.php I'm defining: <?php use Illuminate...
asked by 11.06.2018 / 01:56
0
answers

Get the two objects from an array

I get a request with the following object: { "member_id": 1, "lista": [ { "id": 1, "member_id": 1, "instituicao": "Teste Fund", "data_inicio": "2018-04-25T06:00:00.000Z", "data_termino": "2018-04-25T06:00:00.000Z", "cidade": "Sao...
asked by 15.05.2018 / 02:23
0
answers

CRUD - LARAVEL 5.6

I'm developing a CRUD and in my controller I have the create function: public function create() { $neighborhood = new Neighborhood(); $city = new City(); return view( view: 'admin.cities.create', compact( varname: 'city', _:'neighb...
asked by 24.04.2018 / 03:13
2
answers

How to use with no return from a DB :: Select - Laravel

To get the information, it is using a DB::RAW like this: ThisisinRepository.InController,IwouldliketousewithtobringtherelationshipsmadeintheModel: But DB::select returns by default a array , with the query done. I...
asked by 24.04.2018 / 22:16
1
answer

Save various data in Laravel

I have the following formula on my blade, and now I want to save the data for each row in my database. How to save this data in Laravel? for ($i = 0; $i < 12; $i++){ var minhaData = moment(DataVencimento).add($i, 'months');...
asked by 29.04.2018 / 22:29
0
answers

How to add a range of data entry in the database with Laravel?

I'm having the following problem, any button in my project that takes the user to insert some information into the database, if it is pressed multiple times quickly (without giving the page time to update and display the data), it inserts severa...
asked by 17.05.2018 / 15:12
0
answers

Improving modeling in an ordering system [closed]

I developed a food ordering system, but I have doubts about whether the way I modeled the database is the best in terms of performance and longevity (how the system was to behave with a large amount of data). > I have the following table struc...
asked by 29.04.2018 / 00:33
2
answers

Change table color in Laravel Blade

Hello. I want to change the background of a table according to the type in DB. I'm using Laravel 5.5. Can you help me?     
asked by 30.04.2018 / 05:22