Answer the question
In order to leave comments, you need to log in
How to properly use Allow and Disallow in robots.txt?
Good afternoon.
The site has a bunch of "garbage" links like:
http://site.com/slug_link_1/temp_name_1/
http://site.com/slug_link_2/temp_name_2/
http://site.com/slug_link_3/temp_name_3/
...
Disallow: /*/*/
Allow: /category/*/
...
Answer the question
In order to leave comments, you need to log in
With the help of with
It is necessary to make relations in the Order model for each table with which there is a connection.
Then collect them all in the controller into orders
// в зависимости от логики связи
$orders = Order::with('user.cart.lots')
->get();
In my opinion, there are several options here:
1. Use links at the Laravel level
2. Create a view with the necessary data in the database and make a selection from it
3. Using DB::select
, create a query in which you will join the tables using the query as you need
Can be done using Eloquent
In the orders model, write 2 belongsTo
Then write a query
And now I'm looking and I don't understand why you have orders.lot_id associated with cart.id? Maybe the connection should be made from orders.lot_id to lots.id?
If there are more junk, then disable everything and allow selected ones, for example:
Disallow: /
Allow: /category/it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question