How to get Guzzle Post Request Response?

You can use it for get body response

Continue reading...

How to get Guzzle Post Request Response?

You can use it for get body response

Read More
            

How to combine two strings together in PHP 8

How to combine two strings together in PHP 8.

When we develop any application using PHP language, for deferent reason we need combine two string.

PHP 8 is recently release, this combine is also work at PHP 8.

Syntex:

<?php

$fullName = "Jahidul Hasan Zahid"; //string

$age = 25; //integer

$address = "He is a software engineer. He complete his BSc in Software engineering at Daffodil International University"; //text

$concatenation  = $fullName . "( . $age . )" . $address;

echo $concatenation;

...

Read More

Laravel 7 and password install common issue

Some developers make a simple mistake and get an error from Laravel 7 and password installation.

PROBLEM:
    - laravel/passport[v10.1.0, ..., 10.x-dev] require illuminate/auth ^8.2 -> found illuminate/auth[v8.2.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires laravel/passport ^10.1 -> satisfiable by laravel/passport[v10.1.0, 10.x-dev].

SOLVE: Please use this command why you install password 

composer require laravel/passport:^9.0

Read More

How to query between two dates using Laravel and Eloquent?

Laravel is most popular php framework. Eloquent is a most useful feature.

Now, today's question is, How to query between two dates using Laravel and Eloquent?

The whereBetween method verifies that a column's value is between two values.

$start_from = date('2021-01-01');

$end_to = date('2021-02-02');

YourDbTableNameOrModelName::whereBetween('booking_from',[$start_from, $end_to])->get();

I hope it will be work and it's solve your problem.

Read More

PHP | rand() or mt_rand() function

rand() is a  inbuilt-function in PHP. It's use for generate a random number.

Syntax: rand() or rand(10,99)

The rand() function is use to generate a random integer. rand(min.max) - min specifies the lowest value return and max specifies the height value return.  

 

Read More

Javascript Events: input, change, copy, cut, paste

Javascript Events: input, change, copy, cut, paste

Events: Change

The change event triggers when the element has finished changing. 

 

Events: input

The input event triggers every time after a value is modified by the user.

 

Events: copy, cut, paste

These events occur on cutting/copying/pasting a value.

Read More

Remove public from URL at live server - Laravel

Sometime shared hosting create /public url issue. I face this issue many time with my Laravel 6, Laravel 7 and Larave  8 project. So, what i use for solve this issue, i am going to share with you.  /public is not good to look and also it's not good for SEO.

So let's remove this public from laravel project live URL.

Step One

Please go to root

rename `server.php` as `index.php`

 

Step Two

go to public folder and copy htaccess and paste it at -root. or make a new htaccess at root folder

a...

Read More