2020欧洲杯手机版注册

A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [eloquent]

2020欧洲杯手机版注册The Eloquent ORM included with Laravel provides a beautiful, simple ActiveRecord implementation for working with your database. Each database table has a corresponding "Model" which is used to interact with that table. Models allow you to query for data in your tables, as well as insert new records into the table.

Filter by
Sorted by
Tagged with
3
votes
0answers
20 views

Laravel retrieve records from database using mysql view instead of the table itself

I know this is a simple question and I tried hard to search a solution for this. Maybe someone knows or experienced this already that might help me.I am only a beginner in using Laravel please bear ...
0
votes
2answers
31 views

Laravel Repository

I have a Repository that called Business Logic Repo where my functions or methods stores.And there is a Database Logic Repo that has a method that can interact with the database. My question is ...
0
votes
1answer
25 views

Laravel Eloquent relationship insert/update best pratices

I've searched a lot about this question but having trouble finding the 'right' answer.I'm trying to insert/update a db-entry with an automatic update of the relation (as far as i can tell this is not ...
0
votes
1answer
23 views

Laravel Language changer

I add localization to my laravel app. I define language in my routes.Route::group(['prefix' => '{language}/tender', 'middleware' => ['permission:tender-page']], function () { Route::get('/'...
0
votes
2answers
27 views

When condition on eloquent with the column values on the table

How can I add in conditional the value of the query i'm using on when function of eloquent laravel?Here's what I want to happen$user = User::when('logged' == '3', function ($q){ $q->...
0
votes
1answer
25 views

searching multiple columns with multiple values using eloquent

I need to search 3 tables by eloquent let say I have these values$periodStart = $request->input('periodStart'); $periodEnd = $request->input('periodEnd'); $...
0
votes
0answers
41 views

Call to a member function prepare() on null Laravel

I'm trying to add a where condition using a function but this causes me to get the following error:Call to a member function prepare() on null in /vendor\/laravel\/framework\/src\/Illuminate\/...
0
votes
2answers
26 views

Laravel limit query param results

i have a query which filters films based upon the input by the user, i am needing to add a limit as a query parameter so it limits the amount of films that are returned, how do i add this in, i am new ...
1
vote
4answers
57 views

How count by the first letters in Laravel Query Builder?

I want to make a count by the first letters... I have this columnI would like to count each OE rows and each GICS rowsI'm working with this query$data4 = DB::table('incidencias') ->select(...
-2
votes
1answer
42 views

Too few arguments to function App\Http\Controllers\AccountsController::index(), 0 passed and exactly 1 expected in laravel

The session is being destroyed after successfully logged in or there's some error with the guard that couldn't retain the session. When asked for your_session_key the on the view of the dashboard, it ...
0
votes
1answer
19 views

How do i load my dynamic menu item on every page in Laravel?

Is there way to load my menu categories and sub-categories(which is fetched from database) on every page? What I was doing was$categories = $this->someService->getAllCategories();return view('...
0
votes
1answer
45 views

Laravel many to many relationship collection empty

When I return with my relationship with the collection is always empty, I do have data in my database.Client model public function orders(){ return $this->belongsToMany(Service::class)->...
1
vote
1answer
29 views

Laravel Eloquent Builder Advanced Where

I have the following interface:<?phpnamespace App\Filters\Contracts;use Illuminate\Database\Eloquent\Builder;interface FilterInterface{ /** * Apply a given search value to the ...
0
votes
0answers
24 views

Create a distant relationship with hasMany and polymorphic relationships

Goal: I am trying to retrieve the payment_tags associated with a contact. These payment_tags are themselves associated with a payment or a recurring_payment.The Eloquent relationship are as follow:...
0
votes
1answer
32 views

Too few arguments to function App\Http\Controllers\Admin\AccountsController::index(), 0 passed and exactly 1 expected in laravel

The session is being destroyed after successfully logged in or there's some error with the guard that couldn't retain the session. When asked for your_session_key the on the view of the dashboard, it ...

15 30 50 per page