Category "laravel"

How to find the desired element in the array and check whether it has a value or not?

I have a big array like this: "twitter_link" => "http://twitter.com" "twitter_text" => "text" "youtube_link" => "" "youtube_text" => "" "snapchat_li

How to structure HTTP test for Laravel relationship?

Using the blog scenario, I have a Post and an Author model. There is a many-to-many relationship with additional attributes on the relationship. In the applic

Where does laravel gets the file name form a base64 decoded file

i have an file encoded in base64 and when i decode it and dump with dd() in laravel and it shows the file name and type so i was wondering where laravel stores

How to perform action globally when record get updated in laravel

Is that possible to run this job UpdateRateZone globally wheneven Consignment Model gets updated anywhere in the system? One method is to use Observer but obser

Convert latlng raw query to Eloquent query

$markerResult = Accommodation::with('images') ->whereRaw($lat <= (`lat`+(0.00898315284 * $radius))) ->whereRaw($lat >= (`lat`-(0.00898315284

How to change PHP code style in PhpStorm IDE?

I'm using Laravel framework. I want to change the default code style format from this: return [ 'name' => 'required|min:4|string', '

Laravel Blade Component - Pass property with colon in the middle and access from class

I have the following code in a Livewire Component <x-input.color wire:model="foo.name" wire-test="foo.name" /> So I am trying to use a Blade Comp

Laravel join multiple query result

when i run the following query, results are listed multiple. there are 3 records in the table but it lists 5 $adverts = Advert::where("category_id", $category-&

Laravel . How to Get the start_date end_date of month, week or day of closed_at date in a filter

How to Get the start_date end_date of month, week or day of closed_at date in a filter. i want to fetch start_date an end_date of closed_at The two dates specif

Laravel 9 vue js 3 Ckeditor 5 not showing

I want to install ckeditor to add blog posts to my Laravel 9 mix and vue js 3 project. If I do as the ckeditor says on his page, the ckeditor will not appear un

Deploy Laravel app on shared hosting properly?

What am I doing Open FTP -> public_html -> laravel folder. Copy all files from local directory to laravel folder Open URL of the site and get this on the

The POST method is not supported for this route. Supported methods: GET, HEAD for register users. - LARAVEL

Hi guys I saw many times this problem and I solved it but this time I cant see where is the problem, I have been blocked for several days, so I would like someo

How to foreach categories from 3rd index from my database / Laravel?

I am issuing a problem with the following: I foreach-ed my categories from index 1 to 3 in my blade file. Code @foreach($categories->take(3) as $category) &l

Laravel 7: Calling data with a custom foreign key shows error

I have a department table. Here is a column name created_by. It stores the id from users table. I want to call the users name from created_by column's id. But i

Foreach for Categories

i have this data, I want to loop with categories for each question. Right now all I can do is loop by displaying sequentially for each question (as in the image

Laravel 9: Auth::user() / auth()->user() null after successfull login

I made a manual login system in a Laravel 9 API that it's works correctly, but when I try to use Auth::user() in another controller, I get it as null, but when

How to combine lines of code into one line?

I have 2 lines of code here but i want to combine all 2 lines into 1 // How to combine these 2 lines here $product = $this->productService->searchProduct(

ERROR LARAVEL EMAIL: Unable to connect with STARTTLS: stream_socket_enable_crypto(): SSL operation failed with code 1

Greetings to the community! I have recently developed a web page with Laravel 9.X, which works correctly in local, but when I upload it to my Host, I am having

How to find data in other row with laravel-excel

I'm using maatwebsite/excel to import an excel file with laravel and save data to database In my excel file I have a column name "Ref" and an other name "toRef"

How to test a Laravel project for duration of requests

In a headless Laravel project we use unit and feature test. The unit and feature tests checks the input and output of the requests and the methodes but they won