Questions tagged [Laravel] (4037)

2
answers

How to use insert in laravel?

There is a simple form <div class="form-group"> <label for="examplelogin1">Login</label> <input type="login" class="form-control" id="login" placeholder="login"> </div> <div class="form-group"> <label for="exampleInputEmail1">Email</label> <input type="email" class="f...
Minnie_Trantow asked April 2nd 20 at 17:42
2
answers

Django, or laravel for a specific task?

Good time of day, help with the selection. You need to make a program for the company, primarily for the SIS administrator. Goal inventory, and a small monitor. The main question is what is easier to implement. (Important criterion is the development time and simplicity, because it is not my main job and I can do.) There ar...
sandy_Mertz asked April 2nd 20 at 17:38
1
answer

Where ask what would the favicon displayed on all pages?

where to register ,what would the favicon be used in all templates ,but not on hundred times to write it
Ceasar_Rempel asked April 2nd 20 at 17:36
0
answer

Laravel how to connect different forms, depending on the chosen select?

Required: When you select a the select in the form, load the rest of the form. Thought to have generated a form in JS, but the form will be a lot (20 pieces) and they are all completely different. As it is all in a heap in JS it seems wrong to push. Tell me how to realize this task? (maybe as when you select to load a separ...
theron50 asked April 2nd 20 at 17:35
1
answer

How can you reduce repetition and the amount of code?

Hello, please tell me, I have two such conditions:if($request->filled('size')) { $idSize = HelperProduct::getId($request->input('size')); $priceSize = HelperProduct::getPrice($request->input('size')); $sizesObject = Material::whereIn('id',$idSize)->get(); $product->sizes()->attach($idSize); foreach ($p...
Gail_Hintz asked April 2nd 20 at 17:33
2
answers

How to organize the application logic in Laravel?

Hello! A little plunge into the world of Laravale, and there is my question: how to organize the application logic? A little more: there is a controller ArticleController there is a Model Models\Article and repository Repositories\ArticleRepository In addition there is a category of articles for which a separate model, a s...
dolly28 asked April 2nd 20 at 17:31
1
answer

Why attempt returns false?

Encountered an error during authentication: when you attempt to pass it, method Auth::attempt returns false, even though the phone and the password is correct. I think the fact that I have a table called password, passhash as. Table - User Class registration:protected function create(Request $data) { if (User::where('phone...
uriah_Bogan15 asked April 2nd 20 at 17:31
2
answers

How to simply access data from two tables in one column?

Please tell me how I can simply access data from two tables by value value? In the tables "data1, data2" stored statuses of different types and I need to make a table to show how many users have that status.$query = User::leftJoin('data1', 'data1.user_id', '=', 'users.id') ->leftJoin('data2', 'data2.user_id', '=', 'user...
clay_Dickens asked April 2nd 20 at 17:27
5
answers

What will work faster: link or join?

Good afternoon. Occasionally use one, then joinme. And that's going to have to choose one or the other for further work. But I don't know what is more effective and faster. The goal as usual - DB optimization, so that the project opens with the nimble, even for a split second. So. Let us examine the most frequent example ...
Eloy.Morissette asked April 2nd 20 at 17:23
0
answer

To the parent of the Eager Loading in Laravel?

Assume download posts with comments and votes$posts = App\Post::with(['comments.votes' => function($query) { // How here to receive the comment that belongs to that voice? }])->get(); How can we get the commentary voice?
ahmad.Kloc asked April 2nd 20 at 17:22