Store files on gdrive from controller

15 Views Asked by At

I am successfully storing files on google drive from code but I am doing this from web.php. I just want to do this from my controller file but failed to do this.

Here is my web.php code:

Route::get('test', function() {
    Storage::disk('google')->put('test.txt', 'Hello World');
    dd('done');
});

I have tried like below:

Route::get('test', 'HomeController@test')->name('test');

Controller :

public function test(Request $request)
    {
        dd('12345');
    }

But, it didn't print in controller.

Please help me out.

0

There are 0 best solutions below