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
0
votes
1 answer

Why isn't this Laravel model deleting?

I'm just trying to make a simple form that deletes a model record from the database. I've done it before, but the following code only flashes the success message and redirects. The record never leaves the db. Here is my form: @foreach ($users as…
KinsDotNet
  • 1,500
  • 5
  • 25
  • 53
0
votes
1 answer

Laravel / Illuminate's useWritePdo not being respected when loading relationships

I'm trying to force my application to use the write connection when running a select because of race conditions dealing with updating the data and refreshing it. I have confirmed that useWritePdo() function is being called, but I can tell it's not…
Colin M
  • 139
  • 1
  • 12
0
votes
0 answers

Migration in Laravel Lumen 5.4 throws 'non-numeric value encountered' error

I am running against this error when running my migration: In DatabaseMigrationRepository.php line 113: A non-numeric value encountered The error is thrown on line 113 here…
mike
  • 1,786
  • 2
  • 19
  • 31
0
votes
1 answer

getting user profile using a slug

I am trying to retrieve a user profile using a unique slug. With the user signed in, I can only get the first profile recorded in the db instead of the signed in user, and I am not sure why? I still wanna be able to see the profiles if I am not…
Dustin
  • 112
  • 4
  • 15
0
votes
1 answer

Laravel is telling me undefined index but dd says it's there

Started a new Laravel 5.2 project and implemented the default authentication that comes with it. I wanted to modify it so that the registration form has a field for first name and last name instead of just 'name'. I added the fields in the view,…
lola_the_coding_girl
  • 843
  • 2
  • 10
  • 22
0
votes
1 answer

Query multiple relationships in model october cms

Hi I'm trying to make an combined query with October CMS active record implementation to filter out user selected input. The are four models a Color, Series, Department and Product with the relationships as follows: The Product model public…
adam
  • 618
  • 2
  • 11
  • 31
0
votes
1 answer

How to call data from 2 diferent table by id in eloquent?

thats the controller public function hitung($request, $response, $args) { $datauser = User::with(['usia','aktivitas'])->find($args['id']); $tinggi = $datauser['tinggi']; $berat = $datauser['berat']; $nama …
0
votes
1 answer

How do I use raw select in Eloquent?

My SQL is something like this: SELECT NAME, PLACE, ETC, format(((sum((AMOUNT * U_PRICE)) - ((sum((AMOUNT * U_PRICE)) * 20) / 100)) * 1.18),2) AS TOTAL_PRICE FROM THE_TABLE And my Eloquent query is: theTable::select( 'NAME', …
ilhan
  • 8,700
  • 35
  • 117
  • 201
0
votes
2 answers

Laravel 5.3 - Auth Scaffolding How Are Errors Inserted

Im relatively new to Laravel and try to make sense of something. I created a basic project and used ` ` php artisan make:auth ` to generate a authentication scaffolding. In the generated views, the $errors variable is available. I know that this can…
0
votes
1 answer

How to allow full access multiple url segments in Larvel5.3.19

I'm create file upload with CKeditor4.5 with Larvel5.3.19 this task I want to know is it possible to allow Larvel url for fully accessing multiple url segments…
0
votes
0 answers

Laravel 5.3.19 Illuminate\Support\Str::class error syntax error, unexpected ';'

I got error when i use Str from Alliases Aliases Declaration: 'Str' => Illuminate\Support\Str::class, Usages:

{{ Str::limit($notice->description,100)}}

Error Type: FatalErrorException in aae7b22b68f86ae3874e1bac917a810813cbf059.php…
DMS-KH
  • 2,669
  • 8
  • 43
  • 73
0
votes
1 answer

Get authentication data inside of Constructor issue in Laravel5.3.19

I have upgrade Laravel from 4.2 to laravel5.3 but I can't access Authentication data inside of Constructor of Controller I have as below Middleware but it never work for me use App\Http\Controllers\BaseController; use Closure; use…
DMS-KH
  • 2,669
  • 8
  • 43
  • 73
0
votes
1 answer

How to use RouteCollection in Laravel5.0

I want to all route namelist, actionlist and other data inside of controller in laravel 5.0 by using Symfony\Component\Routing\Annotation\Route;component I've used below code in view it will word as well but if I used in Controller I will get errors…
DMS-KH
  • 2,669
  • 8
  • 43
  • 73
0
votes
0 answers

Illuminate Builder Won't Connect (Non Eloquent)

I have to use the Illuminate (Non Eloquent) for a sub-system. I don't want to make over 1000 models for the Database. I can get the Query methods working but I'd also like to add the Builder. app.php use \Illuminate\Database\Capsule\Manager as…
JREAM
  • 5,741
  • 11
  • 46
  • 84
0
votes
2 answers

Illuminate library capsule object not accepting 'addConnection' command

I am developing an application in Slim framework using Illuminate library. I am trying to create a connection to the database using Illuminate\Database\Capsule\Manager. Some how, it isnt recognizing the 'addConnection' statement. Here is my full…
Daniel
  • 269
  • 6
  • 16