I have category and product table as follows: Categories: id | name | slug | parent_id Products : id | brand_id | name | slug | price | desc P
I have a shop model you can see it <?php namespace App; use Illuminate\Database\Eloquent\Model; use TCG\Voyager\Traits\Spatial; class Shop extends Mode
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 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
How to get a part of the url? query to be made: $name = 'LeSant'; // (from url dinamic) // $event = Dias::where('name', $name)->first(); How can I get name
I am trying to yield a section inside another section which is itself yielded in master.blade.php, but it does not work. master.blade.php <!DOCTYPE html>
I am new to laravel and php. I have this code in one of my controllers: $group_by_precedence = array("true", "false"); And this code in the view: @foreach ($gr
I created a migration file using php artisan make:migration create_todoapps_table. The migration file was created with the table name as to_do_apps (Schem
DB::enableQueryLog(); $mines = Cranks::where([['crank_id', '=', $this->crank_id], ['mine_id', 'like', '%'.$script_value->mine_id.'%'] ])->get(); $query
In my laravel 5.7 / bootstrap 4.4 app I use spatie/browsershot 3.37 and spipu/html2pdf 5.2 to generate pdf file and for my generated pdf file want I set layout
I am trying to create new Laravel application. I have installed XAMPP and Composer. With Composer ( composer global require laravel/installer ) I have installed
How do I fetch name of locale (language) not just a locale string, but rather the name of that language in LARAVEL? {{ app()->getLocale() }}
Laravel version:7.13, SqlServer:2019 SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: An existing connection was forcibly closed by
I have a working Laravel project with loads of different routes. I'm currently testing it and one of my tests was to check if a user were to use a delete or pos
These are all optional fields, so will I have to write multiple queries with conditions or is there any way to handle this using Laravel? What will be the query
I moved my project from desk to another. When I run php artisan it does not work. I tried to run composer update, but it returns the error Script @php a
I am working on Razorpay integration and after succesful payment when I try to save the details to the database I get an error. I am sending t
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
I'm a bit fresh to Laravel. I installed it via composer in the xampp/htdocs file. I installed the latest version 5.6. The install works with no errors, and the
When i run Cache::put('max_age','100',60)); Then the error said that file_put_contents(storage/framework/cache/data/8f/87/8f87426f74633c0fa8f717150f13e8fc04