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.