Skip to content

Commit

Permalink
dir struct, renaming, move test config val sets, rename arti (#24)
Browse files Browse the repository at this point in the history
* dir struct, renaming, move test config val sets

* arti
  • Loading branch information
shavonn committed Dec 26, 2023
1 parent 209eb6d commit 11e8dee
Show file tree
Hide file tree
Showing 72 changed files with 340 additions and 260 deletions.
14 changes: 0 additions & 14 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,20 +336,6 @@
'parent' => 'app',
],

/*
|--------------------------------------------------------------------------
| Routes Path
|--------------------------------------------------------------------------
|
| This value is the path where routes may be loaded from.
| Requires 'path' key.
|
*/
'routes' => [
'path' => 'routes',
'parent' => 'base',
],

/*
|--------------------------------------------------------------------------
| Rule Path
Expand Down
12 changes: 8 additions & 4 deletions docs/artisan-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ These are Laravel Artisan commands I've wrapped so that your custom directory st

Caveats:

- `make:migration` isn't wrapped. You will need to use `arty:migration`. Why? This one is quite different from the others and more difficult to tinker with than I was willing to lend time to. It’s better just left as is, in my humble opinion.
- `make:migration` isn't wrapped. You will need to use `arti:migration`. Why? This one is quite different from the others and more difficult to tinker with than I was willing to lend time to. It’s better just left as is, in my humble opinion.

## arty:migration
## arti:migration

```shell
artisan make:migration [name]
artisan arti:migration [name]
```

Extends `artisan make:migration`
Expand Down Expand Up @@ -62,7 +62,7 @@ Default dir in config: `app/View/Components`

### Note

- This command will use the laraca view path config value instead of the one set in `config/view.php` when generating the blade file.
- Depends on the [Config view key](/config#view)

## make:controller

Expand Down Expand Up @@ -297,3 +297,7 @@ artisan make:view [name]
Extends `artisan make:view`

Default dir in config: `resources/views`

### Note

- Depends on the [Config view key](/config#view)
4 changes: 4 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
## How the Config Works

Every key in the config corresponds to a fairly obvious command.

### view

If the laraca config `view` key is set or throws and error, will use the Laravel view path from `config/view.php`.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Database\Console\Migrations\MigrateMakeCommand;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'arty:migration')]
class ArtyMigrationCommand extends MigrateMakeCommand
#[AsCommand(name: 'arti:migration')]
class ArtiMigrationCommand extends MigrateMakeCommand
{
use GetsConfigValues;

Expand All @@ -17,7 +17,7 @@ class ArtyMigrationCommand extends MigrateMakeCommand
*
* @var string
*/
protected $signature = 'arty:migration {name : The name of the migration}
protected $signature = 'arti:migration {name : The name of the migration}
{--create= : The table to be created}
{--table= : The table to migrate}
{--path= : The location where the migration file should be created}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use HandsomeBrown\Laraca\Console\Concerns\Generates;
use Illuminate\Foundation\Console\CastMakeCommand;

class MakeCastCommand extends CastMakeCommand
{
use Generates;
use GetsConfigValues;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\ChannelMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\ConsoleMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\CreatesView;
use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use HandsomeBrown\Laraca\Console\Concerns\Generates;
use Illuminate\Foundation\Console\ComponentMakeCommand;

class MakeComponentCommand extends ComponentMakeCommand
{
use Generates;
use CreatesView;
use GetsConfigValues;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Routing\Console\ControllerMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Console\GeneratorCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\EventMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\ExceptionMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use HandsomeBrown\Laraca\Console\Concerns\Generates;
use Illuminate\Database\Console\Factories\FactoryMakeCommand;
use Illuminate\Support\Str;

class MakeFactoryCommand extends FactoryMakeCommand
{
use Generates;
use GetsConfigValues;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\JobMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\ListenerMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\MailMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Routing\Console\MiddlewareMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use HandsomeBrown\Laraca\Console\Concerns\Generates;
use HandsomeBrown\Laraca\Console\Concerns\HasLocalStub;
use HandsomeBrown\Laraca\Concerns\HasLocalStub;
use Illuminate\Foundation\Console\ModelMakeCommand;
use Symfony\Component\Console\Input\InputOption;

class MakeModelCommand extends ModelMakeCommand
{
use Generates;
use GetsConfigValues;
use HasLocalStub;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\NotificationMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\ObserverMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\PolicyMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\ProviderMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\RequestMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\ResourceMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\RuleMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use Illuminate\Foundation\Console\ScopeMakeCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use HandsomeBrown\Laraca\Console\Concerns\Generates;
use Illuminate\Database\Console\Seeds\SeederMakeCommand;
use Illuminate\Support\Str;

class MakeSeederCommand extends SeederMakeCommand
{
use Generates;
use GetsConfigValues;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use HandsomeBrown\Laraca\Console\Concerns\Generates;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'make:structure')]
class MakeStructureCommand extends Command
{
use Generates;
use GetsConfigValues;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use HandsomeBrown\Laraca\Console\Concerns\Generates;
use Illuminate\Foundation\Console\TestMakeCommand;
use Illuminate\Support\Str;

class MakeTestCommand extends TestMakeCommand
{
use Generates;
use GetsConfigValues;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use HandsomeBrown\Laraca\Console\Concerns\Generates;
use Illuminate\Console\GeneratorCommand;
use Illuminate\Support\Str;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'make:value')]
class MakeValueCommand extends GeneratorCommand
{
use Generates;
use GetsConfigValues;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace HandsomeBrown\Laraca\Foundation\Console;
namespace HandsomeBrown\Laraca\Commands;

use HandsomeBrown\Laraca\Concerns\CreatesView;
use HandsomeBrown\Laraca\Concerns\GetsConfigValues;
use HandsomeBrown\Laraca\Console\Concerns\Generates;
use Illuminate\Foundation\Console\ViewMakeCommand;

class MakeViewCommand extends ViewMakeCommand
{
use Generates;
use CreatesView;
use GetsConfigValues;

/**
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 11e8dee

Please sign in to comment.