PHPackages                             omatech/laravel-autoview - 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. omatech/laravel-autoview

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

omatech/laravel-autoview
========================

1.0.0(7y ago)0621MITPHP

Since Dec 12Pushed 7y ago3 watchersCompare

[ Source](https://github.com/omatech/laravel-autoview)[ Packagist](https://packagist.org/packages/omatech/laravel-autoview)[ RSS](/packages/omatech-laravel-autoview/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Laravel: autoview helper
========================

[](#laravel-autoview-helper)

Helper to return the views without specifying a path. A simple way to force a consistent organization of `resources/views` folder.

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

[](#installation)

Require the package in your composer.json.

```
composer require omatech/laravel-autoview

```

Usage
-----

[](#usage)

First, organize your views (blades) inside a folder following a basic structure, according to the controller and the action. For example, if we have a controller called `ProductController` with an action called `index`, its view will be located in the folder `product` with name `index.blade.php`.

In addition, it is advisable to group the views in a general folder, to differentiate it from components or layouts. This helper interprets that this folder is called `pages`.

In this way, you can use the `autoview()` helper without having to specify the route where the view is located.

Therefore, instead of this:

```
public function index()
{
    return view('pages.product.index');
}

```

We will do this:

```
public function index()
{
    return autoview();
}

```

Extras
------

[](#extras)

- You can modify the name of general folder by publishing the configuration file and modifying the option `pages_folder`. It can also be ignored by setting `false`.
- If a view needs some data, you can use `with` method of class `Illuminate\View\View`.

```
public function show($id)
{
    $product = Product::find($id);
    return autoview()->with(compact('title', 'subtitle'));
}

```

- If the blade is called differently from the action, it can be passed as a parameter.

```
public function showLoginForm()
{
    return autoview('login');
}

```

```
public function showLoginForm()
{
    $title = 'Login Title';
    return autoview('login')->with(compact('title'));
}

```

- You can ignore the basic structure by setting the second parameter to `false`. Although to do this it is better to directly use `view`.

```
public function showLoginForm()
{
    $title = 'Login Title';
    return autoview('login', false); // = view('login')
}

```

Credits
-------

[](#credits)

- [Adrià Roca](https://github.com/adriaroca)

Organization
------------

[](#organization)

- [Omatech](https://www.omatech.com)

Contributors
------------

[](#contributors)

See the contributors list [here](https://github.com/omatech/laravel-autoview/graphs/contributors).

License
-------

[](#license)

[MIT license](http://opensource.org/licenses/MIT).

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

2

Last Release

2754d ago

Major Versions

0.9.0 → 1.0.02018-12-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a6b2440a7864015d71501a9cd77d28bed549c283afdd8d1af95f54b650dc833?d=identicon)[aponscat](/maintainers/aponscat)

---

Top Contributors

[![adriaroca](https://avatars.githubusercontent.com/u/3205030?v=4)](https://github.com/adriaroca "adriaroca (4 commits)")

---

Tags

laravellaravel-helperslaravel-package

### Embed Badge

![Health badge](/badges/omatech-laravel-autoview/health.svg)

```
[![Health](https://phpackages.com/badges/omatech-laravel-autoview/health.svg)](https://phpackages.com/packages/omatech-laravel-autoview)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135212.4k7](/packages/statamic-rad-pack-runway)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21313.7k3](/packages/ecotone-laravel)[ycs77/inertia-laravel-ssr-head

Simple SSR Head for Inertia Laravel

3413.0k](/packages/ycs77-inertia-laravel-ssr-head)

PHPackages © 2026

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