PHPackages                             fredtux/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. fredtux/artisan-view

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

fredtux/artisan-view
====================

Manage your views in Laravel projects through artisan + generate CRUD views based on a model using bootstrap

v3.6.0(2y ago)06MITPHPPHP ^8.1

Since Aug 29Pushed 2y agoCompare

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

READMEChangelog (1)Dependencies (4)Versions (3)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)

DISCLAIMER
==========

[](#disclaimer)

This is a **forked** version of  which adds the ability to **generate CRUD views based on a model using bootstrap**

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

[](#artisan-view)

[![Latest Version on Packagist](https://camo.githubusercontent.com/943271a2c93ce59471cf40d4bd0cad9753c9aa4c09598c541a60389411657062/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f667265647475782f6172746973616e2d766965772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fredtux/artisan-view)[![Total Downloads](https://camo.githubusercontent.com/88fbe4817e7c3d76ec77e007de6d2162718e7e1dacad75cbf8edc5fa9447e776/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f667265647475782f6172746973616e2d766965772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fredtux/artisan-view)[![Software License](https://camo.githubusercontent.com/6c711032aff1ca0eb6b211aa6cb3649ce7fd64a7714e1181d4bb457f9680e7cf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)\[!\[Build Status\]\[ico-build\]\]\[link-build\] [![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 fredtux/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 `fredtux\ArtisanView\ServiceProvider::class` manually in your `AppServiceProvider`'s `register` method:

```
public function register()
{
    if ($this->app->environment() !== 'production') {
        $this->app->register(\fredtux\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 --section="title:Hello world"

# 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
```

### Generate views (with bootstrap only)

[](#generate-views-with-bootstrap-only)

```
# Create a resource called 'products' with generated views using bootstrap ui extending layout.php
$ php artisan make:view products --resource --generate product --ui bootstrap --extends layout.php

# Create and generate edit and index views based on Product model using bootstrap ui extending layout.php
$ php artisan make:view products --verb=edit --verb=index --generate product --ui bootstrap --extends layout.php
```

### 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)

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

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.6% 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 ~0 days

Total

2

Last Release

985d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c6d705a072260b97b007c739f46f810907609a5a7c03075b04eb8d32ba716a54?d=identicon)[fredtux](/maintainers/fredtux)

---

Top Contributors

[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (163 commits)")[![fredtux](https://avatars.githubusercontent.com/u/5247907?v=4)](https://github.com/fredtux "fredtux (5 commits)")[![chrisdicarlo](https://avatars.githubusercontent.com/u/3483368?v=4)](https://github.com/chrisdicarlo "chrisdicarlo (5 commits)")[![NathanGiesbrecht](https://avatars.githubusercontent.com/u/1516627?v=4)](https://github.com/NathanGiesbrecht "NathanGiesbrecht (3 commits)")[![paxha](https://avatars.githubusercontent.com/u/38579192?v=4)](https://github.com/paxha "paxha (3 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)")[![vinkla](https://avatars.githubusercontent.com/u/499192?v=4)](https://github.com/vinkla "vinkla (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (1 commits)")[![lotje-kinable](https://avatars.githubusercontent.com/u/17978479?v=4)](https://github.com/lotje-kinable "lotje-kinable (1 commits)")[![Manzadey](https://avatars.githubusercontent.com/u/34869211?v=4)](https://github.com/Manzadey "Manzadey (1 commits)")

---

Tags

laravelartisanbladetemplatesviews

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/fredtux-artisan-view/health.svg)](https://phpackages.com/packages/fredtux-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)
