Now, any application you create within your "parked" directory will automatically be served using the http://<directory-name>.test convention. So, if your parked directory contains a directory named "laravel", the application within that directory will be accessible at http://laravel.test. In ...
If at least one notification was sent that passes the given truth test then the assertion will be successful:Notification::assertSentTo( $user, function (OrderShipped $notification, array $channels) use ($order) { return $notification->order->id === $order->id; } );...
That's all there is to it. Now, any application you create within your "parked" directory will automatically be served using thehttp://<directory-name>.testconvention. So, if your parked directory contains a directory named "laravel", the application within that directory will be accessible at...
<directory-name>.testconvention. So, if your parked directory contains a directory named "laravel", the application within that directory will be accessible athttp://laravel.test. In addition, Valet automatically allows you to access the site using wildcard subdomains (http://foo.laravel.test)....
Now, any application you create within your "parked" directory will automatically be served using the http://<directory-name>.test convention. So, if your parked directory contains a directory named "laravel", the application within that directory will be accessible at http://laravel.test. In ...
{ public function test_albums_can_be_uploaded(): void { Storage::fake('photos'); $response = $this->json('POST', '/photos', [ UploadedFile::fake()->image('photo1.jpg'), UploadedFile::fake()->image('photo2.jpg') ]); // Assert one or more files were stored......
A function should do just one thing and do it well.Bad:public function getFullNameAttribute(): string { if (auth()->user() && auth()->user()->hasRole('client') && auth()->user()->isVerified()) { return 'Mr. ' . $this->first_name . ' ' . $this->middle_name . ' ' ...
classMyCustomHookimplementsModelHookInterface {publicfunctionrun(ModelsCommand$command,Model$model):void{if(!$modelinstanceofMyModel) {return; }$command->setProperty('custom','string',true,false,'My custom property');$command->unsetMethod('method');$command->setMethod('method',$command->getMethod...
publicstaticfunctionregister(Application$app):void { $app->bind( abstract:PlanetscaleConnector::class, concrete:fn() =>newPlanetscaleConnector( request:Http::baseUrl( url:config('services.planetscale.url'), )->timeout( seconds:15, )->withHeaders( ...
This is again a standard PHP extension function. Its purpose is to display information regarding the module when thephpinfo()is called from a script. The convention is to display the version of the module and also what version of the db you are dependent on, along with any other configuratio...