Template en Laravel
Versión 3 (Guillermo Zdanowicz, 24/09/2018 15:53)
| 1 | 1 | Guillermo Zdanowicz | h1. Template en Laravel |
|---|---|---|---|
| 2 | 1 | Guillermo Zdanowicz | |
| 3 | 1 | Guillermo Zdanowicz | 3. Instalación de componente |
| 4 | 1 | Guillermo Zdanowicz | |
| 5 | 1 | Guillermo Zdanowicz | Del mismo autor conseguimos la manera de instalar la plantilla AdminLTE en proyectos Laravel, lo conseguimos con el comando |
| 6 | 1 | Guillermo Zdanowicz | |
| 7 | 1 | Guillermo Zdanowicz | *composer require acacha/admin-lte-template-laravel* |
| 8 | 1 | Guillermo Zdanowicz | |
| 9 | 1 | Guillermo Zdanowicz | , es como normalmente trabajamos. |
| 10 | 1 | Guillermo Zdanowicz | |
| 11 | 1 | Guillermo Zdanowicz | En resumen con esto logramos instalar la plantilla AdminLTE en forma de Scaffolding o base para poder trabajar con mucha comodidad. |
| 12 | 1 | Guillermo Zdanowicz | |
| 13 | 1 | Guillermo Zdanowicz | Luego debemos registrar nuestro providers en *config/app.php* |
| 14 | 1 | Guillermo Zdanowicz | |
| 15 | 1 | Guillermo Zdanowicz | /* |
| 16 | 1 | Guillermo Zdanowicz | * Acacha AdminLTE template provider |
| 17 | 1 | Guillermo Zdanowicz | */ |
| 18 | 1 | Guillermo Zdanowicz | |
| 19 | 1 | Guillermo Zdanowicz | *cacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class,* |
| 20 | 1 | Guillermo Zdanowicz | |
| 21 | 1 | Guillermo Zdanowicz | Y registramos el Alias, también en config/app.php |
| 22 | 1 | Guillermo Zdanowicz | |
| 23 | 1 | Guillermo Zdanowicz | /* |
| 24 | 1 | Guillermo Zdanowicz | * Acacha AdminLTE template alias |
| 25 | 1 | Guillermo Zdanowicz | */ |
| 26 | 1 | Guillermo Zdanowicz | |
| 27 | 1 | Guillermo Zdanowicz | *'AdminLTE' => Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class,* |
| 28 | 1 | Guillermo Zdanowicz | |
| 29 | 1 | Guillermo Zdanowicz | Por último, hacemos público nuestro archivo de configuración php artisan vendor:publish --tag=adminlte --force |
| 30 | 1 | Guillermo Zdanowicz | |
| 31 | 1 | Guillermo Zdanowicz | Con esto ya tenemos una gran plantilla instalada, y lo podemos notar al momento de entrar a nuestro proyecto, todo ha cambiado... Welcome, login y todas las vistas de nuestro sistema. |
| 32 | 1 | Guillermo Zdanowicz | |
| 33 | 1 | Guillermo Zdanowicz | Disculpa, ¿te dio error? |
| 34 | 1 | Guillermo Zdanowicz | ¿Por casualidad es 'Laravel\Dusk\DuskServiceProvider' not found? |
| 35 | 1 | Guillermo Zdanowicz | |
| 36 | 1 | Guillermo Zdanowicz | Bueno no te preocupes, instala Laravel/dusk con el comando |
| 37 | 1 | Guillermo Zdanowicz | |
| 38 | 1 | Guillermo Zdanowicz | *composer require --dev laravel/dusk * |
| 39 | 1 | Guillermo Zdanowicz | |
| 40 | 1 | Guillermo Zdanowicz | php artisan vendor:publish --tag=adminlte --force |
| 41 | 1 | Guillermo Zdanowicz | composer require --dev laravel/dusk:^2.0 |
| 42 | 2 | Guillermo Zdanowicz | |
| 43 | 2 | Guillermo Zdanowicz | La ruta del menu esta en |
| 44 | 2 | Guillermo Zdanowicz | |
| 45 | 2 | Guillermo Zdanowicz | /usr/share/nginx/html/titulos/resources/views/vendor/adminlte/layouts/partials |
| 46 | 2 | Guillermo Zdanowicz | |
| 47 | 2 | Guillermo Zdanowicz | |
| 48 | 2 | Guillermo Zdanowicz | el archivo es *sidebar.blade.php* |
| 49 | 3 | Guillermo Zdanowicz | |
| 50 | 3 | Guillermo Zdanowicz | |
| 51 | 3 | Guillermo Zdanowicz | En las vistas , por ejemplo en index |
| 52 | 3 | Guillermo Zdanowicz | |
| 53 | 3 | Guillermo Zdanowicz | @extends('adminlte::layouts.app') |
| 54 | 3 | Guillermo Zdanowicz | |
| 55 | 3 | Guillermo Zdanowicz | @section('htmlheader_title', 'Grupos') |
| 56 | 3 | Guillermo Zdanowicz | |
| 57 | 3 | Guillermo Zdanowicz | @section('contentheader_title', 'Grupos') |
| 58 | 3 | Guillermo Zdanowicz | |
| 59 | 3 | Guillermo Zdanowicz | @section('main-content') |