Is there any way we can use operator or regex as we normally do with the whereIn() clause. I want to use something like this $query->whereIN(name,'like','%te
I get the error Doctrine\DBAL\Schema\SchemaException : There is no column with name 'price' on table 'class_rooms'. while running migration to rename the price
I have category and product table as follows: Categories: id | name | slug | parent_id Products : id | brand_id | name | slug | price | desc P
I started to develop a little Content Management System for two languages (de, en) that starts to grow bigger. In that context, I have Posts and Pages (a bit li
How to delete the aircon in database when there is no any data. Order and Aircon are many to many relationship. $orders = Order::with('aircons', 'user')
I have a Laravel 5.8 app. It works with a Postgres Database encoded with UTF8. I have a query for my users table, so i made my query as: $users = User::where
I just upgraded laravel 7 to laravel 8.30.1 and I am trying to add the default value of pivot column object_model of term_relationships table using the newly in
I am new to laravel, I need to create a query for the db, $query = Deal::query(); I want to use the wherehas operator. this is my code that is worked. else if
Hello and thank you beforehand for your help. I've been hitting my head against a wall with this problem for a few days now so decided to ask here. I have two q
Laravel 8. I have two tables(models) 'employees' and 'positions'. In a model 'employees' I have a casts: protected $casts = [ 'academic_post' => 'array'
Laravel 5.7 Hello I have been looking through stack overflow and have tried many possible answers and have come to no conclusions. I am updating a simple inte
My query from Laravel Builder toSql() function. select `dispatcher_leads`.*, (select CASE WHEN lead_positions.order_type = 'shift' THEN DATE_ADD(lead_positions
In Laravel I have got this error, while inserting a record in my MongoDB database. Call to a member function prepare() on null namespace App\Http\Controllers;
i use mutator in my model to encrypt id: public function getIdAttribute($value) { return encrypt($value); } but I want the default value to be the original
I have been trying to update the timeout for a given user_id, logdate, and status but my update statement is not working or may be my other if else are not corr
Recently I just realized that Laravel generates a static method with column name when joined in a where clause using camel case example $user = User::whereN
Laravel 3 Table table_user id name table_barang id iduser name statusbarang_id table_statusbarang id name My code UserModels: public function BarangModels()
I am making a schedule display system and it shows the schedules of ferries. my problem is if I dont put midnight time in order then query skips midnight time a
I use mongodb and mysql together with Laravel. Fields table in mysql database can have more options in mysql database. fields table in mysql: id, name options
The code below works perfectly and displays all products with discounts in JSON Format for my API. But I want the result ordered by id in the discounts table. S