PHP code example of axe / laravel-graphql-upload
1. Go to this page and download the library: Download axe/laravel-graphql-upload 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/ */
axe / laravel-graphql-upload example snippets
'middleware' => [
Axe\LaravelGraphQLUpload\GraphqlUploadMiddleware::class
]
namespace App\GraphQL\Mutation;
use Axe\LaravelGraphQLUpload\UploadType;
use Folklore\GraphQL\Support\Mutation;
use GraphQL;
class UploadFileMutation extends Mutation
{
public function type()
{
return GraphQL::type('YourReturnType');
}
public function args()
{
return [
"file" => ['name' => 'file', 'type' => UploadType::type()],
];
}
public function rules()
{
return [
'file' => '