PHPackages                             syofyanzuhad/artisan-view - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. syofyanzuhad/artisan-view

ActiveLibrary[Templating &amp; Views](/categories/templating)

syofyanzuhad/artisan-view
=========================

Manage your views in Laravel projects through artisan

v3.4.0(5y ago)416MITPHPPHP ^7.1 || ^8.0

Since Apr 12Pushed 5y agoCompare

[ Source](https://github.com/syofyanzuhad/artisan-view)[ Packagist](https://packagist.org/packages/syofyanzuhad/artisan-view)[ RSS](/packages/syofyanzuhad-artisan-view/feed)WikiDiscussions 3.x Synced yesterday

READMEChangelogDependencies (4)Versions (39)Used By (0)

[![artisan-view](https://cloud.githubusercontent.com/assets/11269635/14457826/a3bde82a-00ad-11e6-8161-0c218937156a.jpg)](https://cloud.githubusercontent.com/assets/11269635/14457826/a3bde82a-00ad-11e6-8161-0c218937156a.jpg)

Artisan View
============

[](#artisan-view)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1f9b526977e602b7c95e0f6f457eb0f84414cc89d75b22c1de742903bcdc9d14/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73796f6679616e7a756861642f6172746973616e2d766965772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/syofyanzuhad/artisan-view)[![Total Downloads](https://camo.githubusercontent.com/f60387ce1bfff3dac60c9529696ba78a691b26da75ee24d66e00c7d049394e7e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796f6679616e7a756861642f6172746973616e2d766965772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/syofyanzuhad/artisan-view)[![Software License](https://camo.githubusercontent.com/6c711032aff1ca0eb6b211aa6cb3649ce7fd64a7714e1181d4bb457f9680e7cf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/74112482ade4a43879db6536582e28398dbd5a331f3ca23b84a96b00f0a142c1/68747470733a2f2f696d672e736869656c64732e696f2f636972636c6563692f70726f6a6563742f6769746875622f7376656e6c75696a74656e2f6172746973616e2d766965772e7376673f7374796c653d666c61742d737175617265)](https://circleci.com/gh/svenluijten/artisan-view)[![StyleCI](https://camo.githubusercontent.com/24b094dc08806afd3d3a88ca259d0823b5e383abcb26ed2e7f7efa037aade5b6/68747470733a2f2f7374796c6563692e696f2f7265706f732f35363035343738332f736869656c64)](https://styleci.io/repos/56054783)

This package adds a handful of view-related commands to Artisan in your Laravel project. Generate blade files that extend other views, scaffold out sections to add to those templates, and more. All from the command line we know and love!

Index
-----

[](#index)

- [Installation](#installation)
    - [Downloading](#downloading)
    - [Registering the service provider](#registering-the-service-provider)
- [Usage](#usage)
    - [Creating views](#creating-views)
    - [Extending and sections](#extending-and-sections)
    - [REST resources](#rest-resources)
    - [Scrapping views](#scrapping-views)
    - [Mix and match](#mix-and-match)
- [Contributing](#contributing)
- [License](#license)

Installation
------------

[](#installation)

You'll have to follow a couple of simple steps to install this package.

### Downloading

[](#downloading)

Via [composer](http://getcomposer.org):

```
$ composer require syofyanzuhad/artisan-view --dev
```

### Registering the service provider

[](#registering-the-service-provider)

If you're using Laravel 5.5 or above, you can skip this step. The service provider will have already been registered thanks to auto-discovery.

Otherwise, register `Syofyanzuhad\ArtisanView\ServiceProvider::class` manually in your `AppServiceProvider`'s `register` method:

```
public function register()
{
    if ($this->app->environment() !== 'production') {
        $this->app->register(\Syofyanzuhad\ArtisanView\ServiceProvider::class);
    }
}
```

Usage
-----

[](#usage)

If you now run `php artisan` you will see two new commands in the list:

- `make:view`
- `scrap:view`

### Creating views

[](#creating-views)

```
# Create a view 'index.blade.php' in the default directory
$ php artisan make:view index

# Create a view 'index.blade.php' in a subdirectory ('pages')
$ php artisan make:view pages.index

# Create a view with a different file extension ('index.html')
$ php artisan make:view index --extension=html
```

### Extending and sections

[](#extending-and-sections)

```
# Extend an existing view
$ php artisan make:view index --extends=app

# Add a section to the view
$ php artisan make:view index --section=content

# Add multiple sections to the view
$ php artisan make:view index --section=title --section=content

# Add an inline section to the view
# Remember to add quotes around the section if you want to use spaces
$ php artisan make:view index --inline-section="title:Hello world"

# Add a section to the view and fill it
# Remember to add quotes around the section if you want to use spaces
$ php artisan make:view index --section="content:"

# Create sections for each @yield statement in the extended view
$ php artisan make:view index --extends=app --with-yields

# Add @push directives for each @stack statement in the extended view
$ php artisan make:view index --extends=app --with-stacks
```

### REST resources

[](#rest-resources)

```
# Create a resource called 'products'
$ php artisan make:view products --resource

# Create a resource with only specific verbs
$ php artisan make:view products --resource --verb=index --verb=create --verb=edit
```

### Scrapping views

[](#scrapping-views)

```
# Remove the view 'index.blade.php'
$ php artisan scrap:view index

# Remove the view by dot notation
$ php artisan scrap:view pages.index
```

This will ask you if you're sure. To skip this question, pass the `--force` flag:

```
# Don't ask for confirmation
$ php artisan scrap:view index --force
```

### Scrapping a REST resource

[](#scrapping-a-rest-resource)

```
# Remove the resource called 'products'
$ php artisan scrap:view products --resource
```

This will remove the views `products.index`, `products.show`, `products.create`, and `products.edit`. If the directory `products/` is empty after doing that, it will also be deleted.

You can scrap part of a resource by adding `--verb` flags:

```
# Remove the 'products.create' and 'products.edit' views.
$ php artisan scrap:view products --resource --verb=create --verb=edit
```

### Mix and match

[](#mix-and-match)

Of course, all the options work well together like you'd expect. So the following command...

```
$ php artisan make:view products --resource --extends=app --section="title:This is my title" --section=content
```

... will put the following contents in `products/index.blade.php`, `products/edit.blade.php`, `products/create.blade.php`, and `products/show.blade.php`:

```
@extends('app')

@section('title', 'This is my title')

@section('content')

@endsection
```

Contributing
------------

[](#contributing)

All contributions (in the form on pull requests, issues and feature-requests) are welcome. See the [contributors page](../../graphs/contributors) for all contributors.

License
-------

[](#license)

`syofyanzuhad/artisan-view` is licenced under the MIT License (MIT). Please see the [license file](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 88.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~53 days

Recently: every ~99 days

Total

35

Last Release

1865d ago

Major Versions

0.0.1 → 1.0.02016-04-12

v1.3.4 → 2.0.0-beta12017-09-01

1.0.x-dev → 2.0.12017-09-15

2.0.x-dev → v3.0.02018-02-09

PHP version history (3 changes)2.0.0-beta1PHP ^7.0

v3.0.0PHP ^7.1

v3.4.0PHP ^7.1 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e1cac985174ded780c6587c27619150114b5ec3bb47ea0bb25696760c1a9fc86?d=identicon)[Syofyan Zuhad](/maintainers/Syofyan%20Zuhad)

---

Top Contributors

[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (157 commits)")[![syofyanzuhad](https://avatars.githubusercontent.com/u/52684582?v=4)](https://github.com/syofyanzuhad "syofyanzuhad (6 commits)")[![chrisdicarlo](https://avatars.githubusercontent.com/u/3483368?v=4)](https://github.com/chrisdicarlo "chrisdicarlo (5 commits)")[![paxha](https://avatars.githubusercontent.com/u/38579192?v=4)](https://github.com/paxha "paxha (3 commits)")[![NathanGiesbrecht](https://avatars.githubusercontent.com/u/1516627?v=4)](https://github.com/NathanGiesbrecht "NathanGiesbrecht (3 commits)")[![vinkla](https://avatars.githubusercontent.com/u/499192?v=4)](https://github.com/vinkla "vinkla (1 commits)")[![Manzadey](https://avatars.githubusercontent.com/u/34869211?v=4)](https://github.com/Manzadey "Manzadey (1 commits)")[![nunomaduro](https://avatars.githubusercontent.com/u/5457236?v=4)](https://github.com/nunomaduro "nunomaduro (1 commits)")[![CasperLaiTW](https://avatars.githubusercontent.com/u/5094008?v=4)](https://github.com/CasperLaiTW "CasperLaiTW (1 commits)")

---

Tags

artisanlaravelviewlaravelartisanbladetemplatesviews

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/syofyanzuhad-artisan-view/health.svg)

```
[![Health](https://phpackages.com/badges/syofyanzuhad-artisan-view/health.svg)](https://phpackages.com/packages/syofyanzuhad-artisan-view)
```

###  Alternatives

[san-kumar/laravel-crud

Laravel CRUD generator: Generate CRUD for any db table with the crud:generate command.

564.4k](/packages/san-kumar-laravel-crud)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
