-
Laravel queries all the articles under it through the tag tag.
post table is the article table, the primary key is id tag table is the tag table, the primary key is id post_tag is the intermediate mapping table, and the field is post_id,tag_id now I want to select tag 1 to find out that all the tags and article...
-
The component of laravel vuejs failed to load. I would like to know what the problem is.
The component of laravel vuejs failed to load. I d like to know what the problem is.
laravel version 5.5.39
introduce the code
has been running npm run watch.
Please let me know if the vue loader webpack needs to be introduced, or is there ...
-
The correct limit and take in the Larave with () function
class essay extends Model
{
public function comment()
{
return $this->hasMany( App comment )
}
}
class comment extends Model
{
public function essay()
{
return $this->belongsTo( App essay )
}
}
...
-
How to catch FatalErrorException exception and return information correctly by lumen
I judge in the render method of Handler that FatalErrorException returns an array
when an exception occurs.
there are other error messages on the returned array, but should you only return the array when catching an exception? how to solve this sit...
-
Laravel time query error
laravel time query error
Controller: :::
...
-
Laravel Package development, how to deal with the many-to-many relationship between Model in a package and Model outside a package
laravel Package development, how to deal with the many-to-many relationship between Model in a package and Model outside the package?
for example: for example, we are going to write an awesome Article Package,. This package mainly provides functions ...
-
Whether the original method of laravel can join subqueries
The granularity of the data stored in the table is relatively fine, so you need to make statistics according to the two fields in the table.
select B.col2,count(col2),sum(t.num)
from (
select col1,col2,count(col3) as num
from A
where A.stat...
-
The problem of the usage of laravel's model
I think belongsTo or hasMany is usually written in model. What s the use of writing this? The following is the code in someone else s Car model. I think when he used it in the controller, he wrote $car = Car::find ($id) . It doesn t seem to be conve...
-
How to configure Hidden index.php? for nginx phpstudy
windows system phpstudy integrated environment, nginx service, after the installation of laravel, except the home page can be accessed, the registration and login pages after make:auth can not be accessed. To find the reason on the Internet, just write ...
-
Laravel big data exports how to optimize excel
laravel big data export cannot perform how to optimize ...
-
Laravel deployment multiple projects
suppose: there are two projects, Project An and Project B, and I want Project An and Project B to share the same framework. Is there a way to achieve ...
-
How to install Laravel? in mac
https: devforgalaxy.github.i.
I am here to see the first step alone is off .
sudo php -r "readfile( https: getcomposer.org installer );" > composer-setup.php
-bash: composer-setup.php: Permission denied
...
-
What is the difference between the request parameters obtained by Input:all () in the laravel framework and the native $REQUEST acquisition parameters in php?
what is the difference between the request parameters obtained by Input:all () in the laravel framework and the native $REQUEST acquisition parameters in php? $input = Input:all (); $input = { "P_UserId ": "10 ", "P_OrderId ": "2302722018033018420...
-
Php recommends developing an interface framework for APP
1. Do you need a framework? the framework loads too many files by default, which hinders performance .
two The framework comes with interface verification (to prevent arbitrary calls), version management (APP version upgrade is fast), etc., if there is ...
-
Can laravel model be used with multiple tables?
learn to see a table corresponding to a model
but if I have a lot of tables
make the corresponding multi-model, of course, also OK
but I basically do the same thing on every model
can I use one model for multiple tables?
is it possible to comm...
-
Why does the Laravel routing order affect the return content?
I just learned the laravel framework and found that the order of routes will affect the content played. Why? normal code:
Route::get( posts ,function (){
return index ;
});
Route::get( posts create ,function (){
return create ;
});
...
-
How does laravel create an empty set merge and merge it with a non-empty collection?
want to do a search function, use multiple keywords to search the same field of the same model (such as description), each keyword search out a collection, these sets may have duplicate content, my idea is to merge these sets first. Then remove the dupl...
-
How much of the data association model data downloaded by laravel exceeds the number of mysql placeholders?
1. Query the user list and initially change the associated order table, but there are too many users, which causes the mysql placeholder to pass and a mysql error is reported.
2, User::with ( order )-> get ()
error: General error: 1390 Prepared st...
-
Routes defined by Laravel resource can only access index,. The rest of them return 404.
Laravel version5.5, uses php artisan serve to start the metropolis server
to confirm that the route has been registered, the result obtained by using php artisan route:list is as follows
visit batches and return 200 correctly
visit b...
-
Is it theoretically possible to use cookie/session for user authentication for Laravel front-end and front-end separation projects?
I added withCredentials to my front-end request, even though I deployed the front and back ends separately.
assume that the front end is deployed at web.xxx.com and that the back end is deployed at service.xxx.com
I define all api as web, so ...