-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
1,110 additions
and
106 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->exclude('somedir') | ||
->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php') | ||
->in(__DIR__); | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRules([ | ||
'@PSR2' => true, | ||
'@Symfony' => true, | ||
'class_definition' => [ | ||
'singleLine' => true, | ||
], | ||
'method_argument_space' => [ | ||
'ensure_fully_multiline' => true, | ||
], | ||
'increment_style' => [ | ||
'style' => 'post', | ||
], | ||
'cast_spaces' => [ | ||
'space' => 'none', | ||
], | ||
'concat_space' => [ | ||
'spacing' => 'one', | ||
], | ||
'phpdoc_align' => [ | ||
'tags' => ['method', 'property', 'return', 'throws', 'type', 'var'], | ||
], | ||
'phpdoc_order' => true, | ||
'phpdoc_to_comment' => false, | ||
'ternary_to_null_coalescing' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'ordered_class_elements' => true, | ||
'ordered_imports' => true, | ||
'yoda_style' => false, | ||
'array_syntax' => [ | ||
'syntax' => 'short', | ||
], | ||
]) | ||
->setFinder($finder) | ||
; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace App\Eloquents\Account; | ||
|
||
use Illuminate\Foundation\Auth\User as Authenticatable; | ||
|
||
class LineUser extends Authenticatable | ||
{ | ||
protected $table = 'line_users'; | ||
|
||
protected $fillable = [ | ||
'user_id', // for key | ||
'line_id', // line的唯一識別碼 | ||
]; | ||
|
||
public function user() | ||
{ | ||
return $this->belongsTo(User::class); | ||
} | ||
|
||
public function assignToUser($user) | ||
{ | ||
return $this->user()->associate($user)->save(); | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace App\Eloquents; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
/** | ||
* Base eloquent class. | ||
*/ | ||
abstract class Eloquent extends Model | ||
{ | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.