File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Binarcode \LaravelDeveloper \Contracts ;
4+
5+ use Illuminate \Contracts \Auth \Authenticatable ;
6+
7+ interface Sanctumable extends Authenticatable
8+ {
9+ public function createToken (string $ name , array $ abilities = ['* ' ]);
10+ }
Original file line number Diff line number Diff line change 22
33namespace Binarcode \LaravelDeveloper \Middleware ;
44
5+ use Binarcode \LaravelDeveloper \Contracts \Sanctumable ;
56use Closure ;
67use Illuminate \Contracts \Auth \Authenticatable ;
78use Illuminate \Http \Request ;
@@ -38,7 +39,7 @@ public static function resolveUserUsing(Closure $resolveUser): string
3839 return static ::class;
3940 }
4041
41- protected function validate (Request $ request , Closure $ next ): ?Authenticatable
42+ protected function validate (Request $ request , Closure $ next ): ?Sanctumable
4243 {
4344 if (! App::environment ('local ' )) {
4445 return $ next ($ request );
You can’t perform that action at this time.
0 commit comments