Category "php"

Issue with laravel eloquent model property

I'm trying to print {{$day->date}} in a view. Instead of full date YYYY-MM-DD the property only returns year YYYY. Can anyone explain me why it is working li

500 (Internal Server Error) with Laravel & Docker [duplicate]

I create Laravel PHP application in Docker. First I setup Laravel app using laravel new laravelDockerApp it creates successfully.I verify

How to identify whether webp image is static or animated?

I am working on a project where a user can upload webp images. I know how to convert webp images into jpg/png, but am stuck on how to identify whether the webp

Yii2: How to download backup files using spanjeta/yii2-backup?

In a Yii2 project I want to download file backup. I have setup the download button in my action column. My code doesn't work, when I click the download button,

Wordpress on Azure - How to change file upload limits

I'm trying to edit the WordPress upload limits for my site to at least 2GB for a migration I'm using WordPress on Azure (Linux), which uses this container under

How to make a foreign key not using primary key

I have a migration on Laravel for table pasien like this : public function up() { Schema::create('pasien', function (Blueprint $table) { $table->

PHP Discord OAUTH2 code sample not working

So this code I found below doesn't work I get to the authenticate screen then when t redirects me it just says Not logged in, Login in again. Does anyone know w

Too few arguments to function App\Http\Controllers\DataPegawaiController::storeDetail(), 1 passed in

i have problem like this. After insert new User to Pegawais table, i want to redirect to another view with user id parameter to define EducationHistory & Wo

Facebook SDK error: Cross-site request forgery validation failed. Required param "state" missing from persistent data

I recently upgraded to the latest version of the facebook SDK and I'm having issues logging users in. I generate the login link just fine, but when facebook se

How to solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

my website running perfect but today 1 order is placed by the customer, and I am getting this error in my website. Here is the screenshot of error error is her

Get number of working days between two dates in PHP [duplicate]

I am trying to find the total working days by specifying the first and end date and also the number of working days in a week. But unfortunate

Message: Set sys_temp_dir in your php.ini after installed composer

I've tried to install composer for my CodeIgniter project. The installation was successful. But, when I type on command-line composer --version, it shows: PH

How to implement placeholder in a php file for moodle plugin?

Hello im new to moodle plugin development and I need to make the "Enter course schedule here..." in the third line disappear when I enter text. If im not mistak

Convert PHP array into HTML tag attributes separated by spaces

I need to convert a PHP array into HTML tag attributes, with spaces and quotes, this is an example: $array=array( 'attr1'=>'value1', 'id'=>'examp

Php - Sum up the numbers in an array one by one

I have an array; $arr=array(1100,3150,4430,4430,5170,7450,7450,7450,8230); I want to show them in graph. I want my Y-Axis as my elements of that array and X-

Netbeans customize laravel blade commands color

I have been working on a Laravel project and was able to implement the code completion from the IDE Helper. What I am trying to find is a way to customize the c

How to read laravel_session cookies saved in cookie memory of browser in client side?

I have an laravel and angular based application, I would like to read cookies from client to server side, But i can't read it. So can any one tell me how could

Can I use a WooCommerce function without any WooCommerce page?

I've WooCommerce installed on my WordPress site. After this, I've created a custom page template that has nothing to do with WooCommerce. Within this template,

Call to a member function givePermissionTo() on null

I'm trying to learn Spatie Laravel Permission Package. When trying to insert data to models has permissions table it gives the below error in postman. I don't k

I'm trying to write a clean url for my website using the $_SERVER['REQUEST_URI'] in php

I have two webpage link together like when a button is press it leads to the second webpage. my problem is that I'm trying to get a clean url with the .php remo