This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Mail\API; | |
use App\Events\API\MessageSending; | |
use App\User; | |
use Illuminate\Bus\Queueable; | |
use Illuminate\Contracts\Queue\ShouldQueue; | |
use Illuminate\Mail\Mailable; | |
use Illuminate\Queue\SerializesModels; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Contracts; | |
interface BaseRepositoryContract | |
{ | |
public function create(array $attributes); | |
public function update(array $attributes, int $id); | |
public function all($columns = array('*'), string $orderBy = 'id', string $sortBy = 'desc'); | |
public function find(int $id); | |
public function findOneOrFail(int $id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: registry.gitlab.com/sample/sample-repo:latest | |
stages: | |
- preparation | |
- building | |
- testing | |
variables: | |
MYSQL_DATABASE: api | |
MYSQL_ROOT_PASSWORD: password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models; | |
use Illuminate\Support\Facades\Request as RequestFacade; | |
use Illuminate\Http\Request; | |
use Laravel\Passport\Client; | |
use Laravel\Passport\Token; | |
use Lcobucci\JWT\Parser; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Contracts\Auth\MustVerifyEmail; | |
use Illuminate\Foundation\Auth\User as Authenticatable; | |
use Illuminate\Notifications\Notifiable; | |
class User extends Authenticatable | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Post extends Model | |
{ | |
protected $guarded = ['id']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Support\Str; | |
return [ | |
'default' => env('DB_CONNECTION', 'mysql'), | |
'connections' => [ | |
'mysql' => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\Schema; | |
class CreatePostsTable extends Migration | |
{ | |
/** | |
* The database schema. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person: | |
def __init__(self, firstName, lastName, age): | |
self.firstName = firstName | |
self.lastName = lastName | |
self.age = age | |
def getFirstName(self): | |
return self.firstName | |
def getLastName(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from person import Person | |
class HR(Person): | |
def getFullName(self): | |
return "Mr/Ms " + self.firstName + " " + self.lastName | |
def getKeywordedArgs(self, **kwargs): | |
# The double asterisk form is used to pass a keyworded, variable-length argument list. | |
a, b = kwargs |