PHPackages                             lukesnowden/laraview - 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. lukesnowden/laraview

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

lukesnowden/laraview
====================

Generates views for laravel applications

v0.0.40(7y ago)06271MITPHPPHP &gt;=7.0.0

Since Oct 2Pushed 7y ago1 watchersCompare

[ Source](https://github.com/lukesnowden/laraview)[ Packagist](https://packagist.org/packages/lukesnowden/laraview)[ RSS](/packages/lukesnowden-laraview/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (10)Dependencies (4)Versions (41)Used By (1)

Laraview
========

[](#laraview)

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

[](#installation)

You can install the package via Composer:

```
composer require lukesnowden/laraview

```

Next, you must install the service provider to `config/app.php`:

```
'providers' => [
    // ...
    Laraview\Providers\AppServiceProvider::class
];
```

And finally run the following command to generate your view files

```
php artisan laraview:compile

```

Demo
----

[](#demo)

A demo can be found at . Just pull the package down, include the service provider and compile the views.

Walk-through
------------

[](#walk-through)

I'd like to provide a walk-through to demonstrate how this package can be used in a production application.

Lets imagine we have an admin panel which has a users section where you can edit a user's details. Lets create that View:

### View Generator

[](#view-generator)

```
php artisan laraview:view

```

[![ViewCommand](./readme/laraview-view--customer.edit.png)](./readme/laraview-view--customer.edit.png)

The `View` stub has now been created and located in `app/Laraview/CustomerEdit/`. We can now register this `View`, I suggest creating a new service provider to keep things clean:

```
php artisan make:provider ViewServiceProvider

```

Add this new provider to the `config/app.php`.

In the boot method of the View service provider register the new `View` using the `Register` object;

```
