forked from spatie/laravel-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'spatie/main' into v4
- Loading branch information
Showing
25 changed files
with
519 additions
and
49 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
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,14 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Contracts\Database\Eloquent\CastsInboundAttributes; | ||
|
||
class {{ class }} implements CastsInboundAttributes | ||
{ | ||
public function set(Model $model, string $key, mixed $value, array $attributes): mixed | ||
{ | ||
return $value; | ||
} | ||
} |
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,19 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes; | ||
|
||
class {{ class }} implements CastsAttributes | ||
{ | ||
public function get(Model $model, string $key, mixed $value, array $attributes): mixed | ||
{ | ||
return $value; | ||
} | ||
|
||
public function set(Model $model, string $key, mixed $value, array $attributes): mixed | ||
{ | ||
return $value; | ||
} | ||
} |
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,11 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
class {{ class }} | ||
{ | ||
public function __invoke(): void | ||
{ | ||
|
||
} | ||
} |
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,8 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
class {{ class }} | ||
{ | ||
|
||
} |
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,30 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use {{ namespacedModel }}; | ||
use Illuminate\Http\Request; | ||
use {{ namespacedParentModel }}; | ||
|
||
class {{ class }} | ||
{ | ||
public function store(Request $request, {{ parentModel }} ${{ parentModelVariable }}): never | ||
{ | ||
abort(404); | ||
} | ||
|
||
public function show({{ parentModel }} ${{ parentModelVariable }}) | ||
{ | ||
// | ||
} | ||
|
||
public function update(Request $request, {{ parentModel }} ${{ parentModelVariable }}) | ||
{ | ||
// | ||
} | ||
|
||
public function destroy({{ parentModel }} ${{ parentModelVariable }}): never | ||
{ | ||
abort(404); | ||
} | ||
} |
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,40 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use {{ namespacedModel }}; | ||
use Illuminate\Http\Request; | ||
use {{ namespacedParentModel }}; | ||
|
||
class {{ class }} | ||
{ | ||
public function create({{ parentModel }} ${{ parentModelVariable }}): never | ||
{ | ||
abort(404); | ||
} | ||
|
||
public function store(Request $request, {{ parentModel }} ${{ parentModelVariable }}): never | ||
{ | ||
abort(404); | ||
} | ||
|
||
public function show({{ parentModel }} ${{ parentModelVariable }}) | ||
{ | ||
// | ||
} | ||
|
||
public function edit({{ parentModel }} ${{ parentModelVariable }}) | ||
{ | ||
// | ||
} | ||
|
||
public function update(Request $request, {{ parentModel }} ${{ parentModelVariable }}) | ||
{ | ||
// | ||
} | ||
|
||
public function destroy({{ parentModel }} ${{ parentModelVariable }}): never | ||
{ | ||
abort(404); | ||
} | ||
} |
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,29 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use {{ rootNamespace }}Http\Controllers\Controller; | ||
use Illuminate\Http\Request; | ||
|
||
class {{ class }} extends Controller | ||
{ | ||
public function store(Request $request): never | ||
{ | ||
abort(404); | ||
} | ||
|
||
public function show() | ||
{ | ||
// | ||
} | ||
|
||
public function update(Request $request) | ||
{ | ||
// | ||
} | ||
|
||
public function destroy(): never | ||
{ | ||
abort(404); | ||
} | ||
} |
Oops, something went wrong.