Skip to content

Commit

Permalink
feat: modify stubs to avoid inheritance from Controller`
Browse files Browse the repository at this point in the history
  • Loading branch information
juantejer4 committed Jan 5, 2024
1 parent d7260ba commit bafe1a5
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
12 changes: 12 additions & 0 deletions src/App/Http/Controllers/TestController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

declare(strict_types=1);

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class TestController
{
//
}
3 changes: 1 addition & 2 deletions stubs/controller.api.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ declare(strict_types=1);

namespace {{ namespace }};

use {{ rootNamespace }}Http\Controllers\Controller;
use Illuminate\Http\Request;

class {{ class }} extends Controller
class {{ class }}
{
/**
* Display a listing of the resource.
Expand Down
3 changes: 1 addition & 2 deletions stubs/controller.invokable.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ declare(strict_types=1);

namespace {{ namespace }};

use {{ rootNamespace }}Http\Controllers\Controller;
use Illuminate\Http\Request;

class {{ class }} extends Controller
class {{ class }}
{
/**
* Handle the incoming request.
Expand Down
3 changes: 1 addition & 2 deletions stubs/controller.model.api.stub
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ declare(strict_types=1);
namespace {{ namespace }};

use {{ namespacedModel }};
use {{ rootNamespace }}Http\Controllers\Controller;
use {{ namespacedRequests }}

class {{ class }} extends Controller
class {{ class }}
{
/**
* Display a listing of the resource.
Expand Down
3 changes: 1 addition & 2 deletions stubs/controller.model.stub
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ declare(strict_types=1);
namespace {{ namespace }};

use {{ namespacedModel }};
use {{ rootNamespace }}Http\Controllers\Controller;
use {{ namespacedRequests }}

class {{ class }} extends Controller
class {{ class }}
{
/**
* Display a listing of the resource.
Expand Down
3 changes: 1 addition & 2 deletions stubs/controller.nested.api.stub
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ declare(strict_types=1);
namespace {{ namespace }};

use {{ namespacedModel }};
use {{ rootNamespace }}Http\Controllers\Controller;
use {{ namespacedParentModel }};
use Illuminate\Http\Request;

class {{ class }} extends Controller
class {{ class }}
{
/**
* Display a listing of the resource.
Expand Down
3 changes: 1 addition & 2 deletions stubs/controller.nested.singleton.api.stub
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ declare(strict_types=1);
namespace {{ namespace }};

use {{ namespacedModel }};
use {{ rootNamespace }}Http\Controllers\Controller;
use Illuminate\Http\Request;
use {{ namespacedParentModel }};

class {{ class }} extends Controller
class {{ class }}
{
/**
* Store the newly created resource in storage.
Expand Down
3 changes: 1 addition & 2 deletions stubs/controller.nested.singleton.stub
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ declare(strict_types=1);
namespace {{ namespace }};

use {{ namespacedModel }};
use {{ rootNamespace }}Http\Controllers\Controller;
use Illuminate\Http\Request;
use {{ namespacedParentModel }};

class {{ class }} extends Controller
class {{ class }}
{
/**
* Show the form for creating the new resource.
Expand Down
3 changes: 1 addition & 2 deletions stubs/controller.nested.stub
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ declare(strict_types=1);
namespace {{ namespace }};

use {{ namespacedModel }};
use {{ rootNamespace }}Http\Controllers\Controller;
use {{ namespacedParentModel }};
use Illuminate\Http\Request;

class {{ class }} extends Controller
class {{ class }}
{
/**
* Display a listing of the resource.
Expand Down
3 changes: 1 addition & 2 deletions stubs/controller.plain.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ declare(strict_types=1);

namespace {{ namespace }};

use {{ rootNamespace }}Http\Controllers\Controller;
use Illuminate\Http\Request;

class {{ class }} extends Controller
class {{ class }}
{
//
}
3 changes: 1 addition & 2 deletions stubs/controller.singleton.api.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ declare(strict_types=1);

namespace {{ namespace }};

use {{ rootNamespace }}Http\Controllers\Controller;
use Illuminate\Http\Request;

class {{ class }} extends Controller
class {{ class }}
{
/**
* Store the newly created resource in storage.
Expand Down
3 changes: 1 addition & 2 deletions stubs/controller.singleton.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ declare(strict_types=1);

namespace {{ namespace }};

use {{ rootNamespace }}Http\Controllers\Controller;
use Illuminate\Http\Request;

class {{ class }} extends Controller
class {{ class }}
{
/**
* Show the form for creating the resource.
Expand Down
3 changes: 1 addition & 2 deletions stubs/controller.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ declare(strict_types=1);

namespace {{ namespace }};

use {{ rootNamespace }}Http\Controllers\Controller;
use Illuminate\Http\Request;

class {{ class }} extends Controller
class {{ class }}
{
/**
* Display a listing of the resource.
Expand Down

0 comments on commit bafe1a5

Please sign in to comment.