Skip to content

Instantly share code, notes, and snippets.

View byrmylmz's full-sized avatar
:octocat:
...

Bayram Yılmaz byrmylmz

:octocat:
...
View GitHub Profile
@byrmylmz
byrmylmz / gist:fe00bb7ae0b506eb162180097d97f1fd
Last active November 26, 2021 16:33
Advance Join For Laravel
<?php
$evaluations=DB::table('evaluations')
->join('people', function ($join) use($project) {
$join->on('evaluations.people_id', '=', 'people.id')
->where('evaluations.projects_id', '=', $project);
})->get();
?>
@byrmylmz
byrmylmz / heroku-remote.md
Created October 28, 2021 07:46 — forked from randallreedjr/heroku-remote.md
Add a Heroku remote to an existing git repo

Working with git remotes on Heroku

Generally, you will add a git remote for your Heroku app during the Heroku app creation process, i.e. heroku create. However, if you are working on an existing app and want to add git remotes to enable manual deploys, the following commands may be useful.

Adding a new remote

Add a remote for your Staging app and deploy

Note that on Heroku, you must always use master as the destination branch on the remote. If you want to deploy a different branch, you can use the syntax local_branch:destination_branch seen below (in this example, we push the local staging branch to the master branch on heroku.

$ git remote add staging https://git.heroku.com/staging-app.git
@byrmylmz
byrmylmz / 01composer.config
Created November 10, 2021 08:25 — forked from euharrison/01composer.config
.ebextensions Laravel
commands:
01-update-composer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: COMPOSER_HOME
value: /root
container_commands: