PHP code example of itsnubix / toast
1. Go to this page and download the library: Download itsnubix/toast library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
itsnubix / toast example snippets
'toast' => fn () => $request->session()->get(config('toast.session_id')) ?? []
/**
* Define the props that are shared by default.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function share(Request $request)
{
return array_merge(parent::share($request), [
'auth' => [
'user' => $request->user(),
],
'toast' => fn () => $request->session()->get(config('toast.session_id')) ?? []
]);
}