array_add()
This method is used to add new key value pairs to an array.
$array = ['username' => 'testuser'];
$array = array_add($array, 'age', 18);
result
['username' => 'testuser', 'age' => 18]
Path methods helps easy access to application related paths easily from anywhere.
public_path()
This method returns the fully qualified public path of the application. which is the public directory.
$path = public_path();
url()
The url function generates a fully qualified URL to the given path.
if your site is hello.com
echo url('my/dashboard');
would return
hello.com/my/dashboard
if nothing is passed to the url method it would return an instance of Illuminate\Routing\UrlGenerator, and it could be used like...