Category "laravel"

dynamic select2 options depending on other select's selected option

I have the following select <select class="form-control" id="from-location" name="from-location"> <option value="1">Inventory 1</option&g

Larael/Vue/JS minimalize/lost focus/changed card alert

Im coding web page and i need to know when user minimalize window/ lost focus on window/ changed card in browser. Is there any function which can give me that i

Message: Trying to access array offset on value of type int

How to resolve this issues: Trying to access array offset on value of type int? PHP8 public function processPayment(Request $request) { $orders

run migration for different database connections

i have two mysql connection and i want to migrate specific database with php artisan migrate --database=databasename and when i ran command php artisan migrate

Creating default object from empty value in Laravel 8

For some reason, I still get a warning message: Creating default object from empty value. Product controller public function update(Request $request, $id) {

Return json response in ajax request laravel

I have the following ajax code in my frontend. var formData = $('#application-information-step-one').serialize(); var actionUrl = $('#application-informatio

how to support Promises in Internet Explorer 11 using laravel mix?

I'm trying to figure out how to get laravel-mix to convert ES6 javascript code into javascript code Internet Explorer 11 can use. I've setup a brand new laravel

Test multidimensional array with Laravel and Pest

I have a little problem when I want to test an array in my unit test. I want to test both structure and type of keys, but I don't know how to process it (I trie

How to Connect to Database SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)

I got this error when i tried to connect to my database: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) (SQL: select act

Using WPML wordpress with Multilingual laravel application as subfolder

I have a multilingual laravel application. My url structure like that: https://example.com/en/paths https://example.com/es/paths I installed wordpress in /publi

Laravel livewire display session message with javascript

I am trying to submit a contact form using laravel livewire like: public $name; public $email; public $phone; public $message; public function submitForm() {

Laravel 5.5 CORS issue when loading FontAwesome 4.7.0

I get a problem. I already read a lot of reference but still get error. Access to font at 'http://192.168.0.1/fonts/fontawesome-webfont.woff2?v=4.7.0' from ori

How set active condition on subrequest?

As Product model has many to many relations with Category (using ProductCategory model). I try to add an additive condition in the request. $productsWithActiveC

How to access Redirect Url of Paypal through

Using Paypal for payment it is working fine when I hit html form from a browser then It redirect's me to Paypal page for payment but on other side when I try to

Laravel issue when inserting many to many with pivot

So I have a many-to-many relationship between attention and services/procedures. A patient has many attentions, and attention belongs to a patient. The issue co

delete a table form a database using laravel command

i need to delete a database table using laravel artisan command . not like this command php artisan migrate:rollback --step=5 i need to create like this route o

Laravel Test intermittently failing due to 1 second difference

I have the following type of test for most models across my application: * @test */ public function an_authorised_user_can_delete_a_contact()

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