We talked about making the Dropzone operation not work... in a more general way. So that people using the Demo in production don't have access to upload stuff. Pedro came up with this - sounds good to me!
<?php
namespace App\Http\Controllers\Operations;
if (! env('APP_ENV') === 'production') {
trait DropzoneOperation
{
public function dropzoneUpload()
{
return response()->json([]);
}
}
} else {
trait DropzoneOperation
{
use \Backpack\Pro\Http\Controllers\Operations\DropzoneOperation;
}
}
And then in demo we use App\Http\Controllers\Operations\DropzoneOperation instead of the one in the package ?
We talked about making the Dropzone operation not work... in a more general way. So that people using the Demo in production don't have access to upload stuff. Pedro came up with this - sounds good to me!
And then in demo we use
App\Http\Controllers\Operations\DropzoneOperation
instead of the one in the package ?If you agree I can push this change.
Cheers
_Originally posted by @pxpm in https://github.com/Laravel-Backpack/demo/pull/456#discussion_r1245146595_