Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

JsonResource withoutWrapping

<?php
 
namespace AppProviders;
 
use IlluminateHttpResourcesJsonJsonResource;
use IlluminateSupportServiceProvider;
 
class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
 
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        JsonResource::withoutWrapping();
    }
}
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #JsonResource #withoutWrapping
ADD COMMENT
Topic
Name
9+8 =