Skip to content

Instantly share code, notes, and snippets.

View srmd-tl's full-sized avatar
🧠

Sarmad Sohail srmd-tl

🧠
  • RWP
View GitHub Profile
@srmd-tl
srmd-tl / gist:ed524d50b982d7905e582a27563ed404
Created December 2, 2020 05:09
Upload files to google drive
// Get the API client and construct the service object.
$client = self::getClient();
$service = new Google_Service_Drive($client);
// Now lets try and send the metadata as well using multipart!
$file = new Google_Service_Drive_DriveFile();
$file->setName("Hello World!");
$result2 = $service->files->create(
$file,
array(
'data' => file_get_contents(request()->file),
@srmd-tl
srmd-tl / heroku
Last active February 3, 2021 18:17
heroku ps:scale web=0 //to stop the heroku app
heroku ps:scale web=1 //to start the heroku app
heroku run bash // to start the terminal
heroku apps // to show all apps
git push heroku master // push to master branch of heroku
heroku config:set APP_KEY=$(php artisan --no-ansi key:generate --show)