Skip to content

Tag: laravel

Laravel container and shared instances

I am wondering how Laravel differentiates between singletons(shared instances) and concrete implementations that might be overwritten inside the container. The container has a bind method that looks like this: It also has a singleton method that calls this function but with the $shared argument always being t…

Group by query in in laravel 5.3

I have fired this query: but I got the following error: PDOException in Connection.php line 332: SQLSTATE[42000]: Syntax error or access violation 1055 ‘baseproject_new.articles.user_id’ isn’t in GROUP BY When run the query in mysql I got the result, but when I run the page I got the error. …

Laravel delete() static call

I got this error: Non-static method IlluminateDatabaseEloquentModel::delete() should not be called statically, assuming $this from incompatible context Here is the code in my controller: Can someone explain what I am doing wrong and how to call it correctly? Answer You have this: But you should be doing this:

Composer installation requirements

I am trying to install composer to the laravel project. When im doing sudo composer install in projects directory it shows me two errors: I was checking how to install it and I found these commands: composer require simplesoftwareio/simple-qrcode composer require esendex/sdk Anyway, they are giving me the sam…