armandsar/laravel-quick-view

Quickly render view from controller without typing file names

Installs: 271

Dependents: 0

Suggesters: 0

Security: 0

Stars: 22

Watchers: 1

Forks: 4

Open Issues: 0

pkg:composer/armandsar/laravel-quick-view

1.0.1 2018-04-24 12:43 UTC

This package is not auto-updated.

Last update: 2025-10-26 10:26:35 UTC


README

Are you tired of typing out view name for your controllers? Then this package is for you!

Software License Build Status Total Downloads

Install

Via Composer

$ composer require armandsar/laravel-quick-view

Usage

Namespace and controller name as folders and method name as file name.

Given that we have a Admin/UsersController

public function create()
{
    return quick();
}

would assume a view at admin/users/create.blade.php

Or if you prefer not to use a helper, there is also a trait:

class UsersController
{
    use Armandsar\QuickView\Quick;
    
    public function show($id)
    {
        $user = User::findOrFail($id)
        return $this->quick(['user' => $user]);
    }
}    

would assume a view at admin/users/show.blade.php

Testing

$ phpunit

License

The MIT License (MIT). Please see License File for more information.