Questions tagged [illuminate-container]

The Illuminate Database component is a full database toolkit for PHP, providing an expressive query builder, ActiveRecord style ORM, and schema builder. It also serves as the database layer of the Laravel PHP web application framework.

117 questions
78
votes
19 answers

Eloquent error: A facade root has not been set

I have been using Eloquent as a standalone package in Slim Framework 2 successfully. But now that I want to make use of Illuminate\Support\Facades\DB since I need to show some statistics by getting the info from 2 tables and using a Left Join and a…
Pathros
  • 10,042
  • 20
  • 90
  • 156
31
votes
1 answer

Laravel 5 Class 'App\Http\Controllers\File' not found

i get the following error: Class 'App\Http\Controllers\File' not found when using in laravel 5 Controller: $files = File::files( $this->csvDir ); I have to add the Filesystem to composer.json and config/app.php. Somehow I use a misconfiguration.…
jerik
  • 5,714
  • 8
  • 41
  • 80
12
votes
6 answers

updateOrCreate with increment in laravel

What I am trying to do is to update or insert the row in table. In my case, update looks something like this: \DB::table('inventories')->where('product_code',$product_code)->increment('stock_current_quantity',$quantity); I don't want to use if else…
Nishal Gurung
  • 451
  • 2
  • 5
  • 20
8
votes
1 answer

How can I add a join to a custom exists rule for a laravel validator?

The validator in laravel can have a customization of the exists database rule, for instance if you need to check an extra column. An example from the manual: use Illuminate\Validation\Rule; Validator::make($data, [ 'email' => [ …
Nanne
  • 64,065
  • 16
  • 119
  • 163
7
votes
3 answers

Validation rule unique requires at least 1 parameters

I've got problem with my laravel I can't post the data One error says InvalidArgumentException in Validator.php line 2593: Validation rule unique requires at least 1 parameters. And here it's my code public function postUbah(Request $request,…
Candra Herk
  • 441
  • 3
  • 6
  • 13
7
votes
1 answer

Multiple database connection using Illuminate/Database Eloquent ORM in CodeIgniter 3

I have just included Laravel's database layer Eloquent to my CodeIgniter 3 project. My problem however is that I can't connect to multiple databases using Eloquent models. For the default DB, this is how I configured the DB: $capsule = new…
christianleroy
  • 1,084
  • 5
  • 25
  • 39
7
votes
7 answers

How to set disabled select option in Laravel with Illuminate/Html

I'm starting with Laravel and I'm using Illuminate/Html for making forms. I want to add disabled attribute to the first option and I dont find the way to do it. {!! Form::open(['url' => 'shelter/pets']) !!}
{!!…
therealbigpepe
  • 1,489
  • 2
  • 16
  • 23
6
votes
1 answer

Laravel error Uncaught exception 'ReflectionException' with message 'Class App\Http\Kernel does not exist'

When I wanted to add form in my laravel 5.2 project I got some errors in composer. After that My whole project got a strange error bellow : Fatal error: Uncaught exception 'ReflectionException' with message 'Class App\Http\Kernel does not exist'…
Rezasys
  • 153
  • 2
  • 12
5
votes
0 answers

Laravel 5 Error - Declaration of Illuminate\Container\Container::make() must be compatible with Illuminate\Contracts\Container\Container::make

After composer update and installing contracts I get this error: Fatal error: Declaration of Illuminate\Container\Container::make() must be compatible with Illuminate\Contracts\Container\Container::make($abstract, array $parameters = Array) in…
user4274597
5
votes
2 answers

'Illuminate\Html\HtmlServiceProvider' not found when trying to install 'Illuminate\Html' in laravel 5

I understand that there are several similar questions here but none of them fixed my problem. I'm trying to add the HtmlServiceProvider with Laravel 5 on Ubuntu 14.04. I keep getting the following error: dl@dl-VirtualBox:~/l5todo$ composer update >…
Daolin
  • 614
  • 1
  • 16
  • 41
5
votes
1 answer

How to create Illuminate/Support/Facade/App facade for standalone Illuminate IoC Container

In my standalone (without Laravel) project i want to use Illuminate IoC container. Also i would like to access the app container through App facade provided by illuminate/support component. I installed both components (v5.0.28). Here is my…
5
votes
5 answers

Illuminate Validator in stand-alone non-Laravel application

I'm building an API using Slim and the Illuminate Database package with Eloquent models etc. I have instantiated the database handler using Capsule as shown in the README. However, now I want to use the validation features on my models without…
Viktor
  • 487
  • 2
  • 8
  • 26
5
votes
1 answer

How can I use Laravel's IOC container outside of Laravel for method injection

Short story: I can not get method injection working with Laravel container installed using composer (https://packagist.org/packages/illuminate/container). Injection only works if used in the constructor of objects. For example: class SomeClass { …
4
votes
5 answers

How to log every query from multiple connections in Eloquent (outside laravel)

I use multiple database connections in my app, one SQLServ, and another MySQL. I want to debug every query from both servers sequentially. therefore rather using Manager::getQueryLog() i need to use Event::listen. I use SlimFramework, with…
Egy Mohammad Erdin
  • 3,402
  • 6
  • 33
  • 57
4
votes
2 answers

Message: Class 'Illuminate\Database\Capsule\Manager' not found in Codeigniter3.1

I have try to configuration Codeigniter3.1 with Illuminate to use ORM but finally I got this errors as below. An uncaught Exception was encountered Type: Error Message: Class 'Illuminate\Database\Capsule\Manager' not found Filename:…
DMS-KH
  • 2,669
  • 8
  • 43
  • 73
1
2 3 4 5 6 7 8