Downloads
Stars
Version
Laravel Command is a command list of a few php artisan
commands. You can use it to create a files (in app directory) or blade views.
Require the package with composer using the following command:
composer require shergela/laravel-command
<?php
return [
Shergela\LaravelCommand\ShergelaServiceProvider::class
];
Create a folder and file Class.
php artisan create:file Your/Folder/file.php
Example:
php artisan create:file Helpers/helper.php
or
php artisan create:file example.php
The above will create a Folders and file directory inside the App directory.\
An Example of created repository class:
<?php
namespace App\Helpers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Str;
class Helper
{
public function __construct()
{
// Your code here
}
public function index(Request $request): void
{
// Write logic here
}
}
Create a blade views.
php artisan create:view your-blade-name
Example:
php artisan create:view pages/users/user.blade.php
or
php artisan create:file users.blade.php
@extends('layouts.app')
@section('content')
<h1> Hello World </h1>
@endsection
Display all Middlewares.\
php artisan middleware:list
+--------------------------------------------------+--------------------------------------+-----------+----------+
| Full Path | File Name | Extension | Size |
+--------------------------------------------------+--------------------------------------+-----------+----------+
| C:\xampp\htdocs\laravel\app\Http\Middleware | Authenticate.php | .php | 0.49 kb |
| C:\xampp\htdocs\laravel\app\Http\Middleware | EncryptCookies.php | .php | 0.324 kb |
| C:\xampp\htdocs\laravel\app\Http\Middleware | PreventRequestsDuringMaintenance.php | .php | 0.383 kb |
| C:\xampp\htdocs\laravel\app\Http\Middleware | RedirectIfAuthenticated.php | .php | 0.963 kb |
| C:\xampp\htdocs\laravel\app\Http\Middleware | TrimStrings.php | .php | 0.4 kb |
| C:\xampp\htdocs\laravel\app\Http\Middleware | TrustHosts.php | .php | 0.392 kb |
| C:\xampp\htdocs\laravel\app\Http\Middleware | TrustProxies.php | .php | 0.677 kb |
| C:\xampp\htdocs\laravel\app\Http\Middleware | VerifyCsrfToken.php | .php | 0.337 kb |
+--------------------------------------------------+--------------------------------------+-----------+----------+
Display all Events.\
php artisan event:list
+--------------------------------------------------+--------------------------------------+-----------+----------+
| Full Path | File Name | Extension | Size |
+--------------------------------------------------+--------------------------------------+-----------+----------+
| C:\xampp\htdocs\laravel\app\Events | Mail.php | .php | 0.49 kb |
| C:\xampp\htdocs\laravel\app\Events | Subscribe.php | .php | 0.124 kb |
| C:\xampp\htdocs\laravel\app\Events | PasswordRecovery.php | .php | 0.384 kb |
+--------------------------------------------------+--------------------------------------+-----------+----------+
Display all Jobs.\
php artisan jobs:list
+--------------------------------------------------+--------------------------------------+-----------+----------+
| Full Path | File Name | Extension | Size |
+--------------------------------------------------+--------------------------------------+-----------+----------+
| C:\xampp\htdocs\laravel\app\Jobs | UserJob.php | .php | 0.49 kb |
| C:\xampp\htdocs\laravel\app\Jobs | AssignUserJob.php | .php | 0.124 kb |
| C:\xampp\htdocs\laravel\app\Jobs | TestJob.php | .php | 0.483 kb |
+--------------------------------------------------+--------------------------------------+-----------+----------+
Display all Models.\
php artisan model:list
+--------------------------------------------------+--------------------------------------+-----------+----------+
| Full Path | File Name | Extension | Size |
+--------------------------------------------------+--------------------------------------+-----------+----------+
| C:\xampp\htdocs\laravel\app\Models | User.php | .php | 0.419 kb |
| C:\xampp\htdocs\laravel\app\Models | Post.php | .php | 0.524 kb |
| C:\xampp\htdocs\laravel\app\Models | Roles.php | .php | 0.483 kb |
+--------------------------------------------------+--------------------------------------+-----------+----------+
The MIT License (MIT). Please see License for more information.