Template en Laravel
Versión 4 (Guillermo Zdanowicz, 22/05/2019 09:58)
| 1 | 1 | Guillermo Zdanowicz | h1. Template en Laravel |
|---|---|---|---|
| 2 | 1 | Guillermo Zdanowicz | |
| 3 | 4 | Guillermo Zdanowicz | |
| 4 | 4 | Guillermo Zdanowicz | |
| 5 | 4 | Guillermo Zdanowicz | composer require jeroennoten/laravel-adminlte |
| 6 | 4 | Guillermo Zdanowicz | Add the service provider to the providers in config/app.php: |
| 7 | 4 | Guillermo Zdanowicz | |
| 8 | 4 | Guillermo Zdanowicz | Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider |
| 9 | 4 | Guillermo Zdanowicz | |
| 10 | 4 | Guillermo Zdanowicz | JeroenNoten\LaravelAdminLte\ServiceProvider::class, |
| 11 | 4 | Guillermo Zdanowicz | Publish the public assets: |
| 12 | 4 | Guillermo Zdanowicz | |
| 13 | 4 | Guillermo Zdanowicz | php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\ServiceProvider" --tag=assets |
| 14 | 4 | Guillermo Zdanowicz | |
| 15 | 4 | Guillermo Zdanowicz | ----------no se borro lo demas porque hay cosas que pueden servir--------- |
| 16 | 4 | Guillermo Zdanowicz | |
| 17 | 4 | Guillermo Zdanowicz | |
| 18 | 4 | Guillermo Zdanowicz | |
| 19 | 4 | Guillermo Zdanowicz | |
| 20 | 1 | Guillermo Zdanowicz | 3. Instalación de componente |
| 21 | 1 | Guillermo Zdanowicz | |
| 22 | 1 | Guillermo Zdanowicz | Del mismo autor conseguimos la manera de instalar la plantilla AdminLTE en proyectos Laravel, lo conseguimos con el comando |
| 23 | 1 | Guillermo Zdanowicz | |
| 24 | 1 | Guillermo Zdanowicz | *composer require acacha/admin-lte-template-laravel* |
| 25 | 1 | Guillermo Zdanowicz | |
| 26 | 1 | Guillermo Zdanowicz | , es como normalmente trabajamos. |
| 27 | 1 | Guillermo Zdanowicz | |
| 28 | 1 | Guillermo Zdanowicz | En resumen con esto logramos instalar la plantilla AdminLTE en forma de Scaffolding o base para poder trabajar con mucha comodidad. |
| 29 | 1 | Guillermo Zdanowicz | |
| 30 | 1 | Guillermo Zdanowicz | Luego debemos registrar nuestro providers en *config/app.php* |
| 31 | 1 | Guillermo Zdanowicz | |
| 32 | 1 | Guillermo Zdanowicz | /* |
| 33 | 1 | Guillermo Zdanowicz | * Acacha AdminLTE template provider |
| 34 | 1 | Guillermo Zdanowicz | */ |
| 35 | 1 | Guillermo Zdanowicz | |
| 36 | 1 | Guillermo Zdanowicz | *cacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class,* |
| 37 | 1 | Guillermo Zdanowicz | |
| 38 | 1 | Guillermo Zdanowicz | Y registramos el Alias, también en config/app.php |
| 39 | 1 | Guillermo Zdanowicz | |
| 40 | 1 | Guillermo Zdanowicz | /* |
| 41 | 1 | Guillermo Zdanowicz | * Acacha AdminLTE template alias |
| 42 | 1 | Guillermo Zdanowicz | */ |
| 43 | 1 | Guillermo Zdanowicz | |
| 44 | 1 | Guillermo Zdanowicz | *'AdminLTE' => Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class,* |
| 45 | 1 | Guillermo Zdanowicz | |
| 46 | 1 | Guillermo Zdanowicz | Por último, hacemos público nuestro archivo de configuración php artisan vendor:publish --tag=adminlte --force |
| 47 | 1 | Guillermo Zdanowicz | |
| 48 | 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. |
| 49 | 1 | Guillermo Zdanowicz | |
| 50 | 1 | Guillermo Zdanowicz | Disculpa, ¿te dio error? |
| 51 | 1 | Guillermo Zdanowicz | ¿Por casualidad es 'Laravel\Dusk\DuskServiceProvider' not found? |
| 52 | 1 | Guillermo Zdanowicz | |
| 53 | 1 | Guillermo Zdanowicz | Bueno no te preocupes, instala Laravel/dusk con el comando |
| 54 | 1 | Guillermo Zdanowicz | |
| 55 | 1 | Guillermo Zdanowicz | *composer require --dev laravel/dusk * |
| 56 | 1 | Guillermo Zdanowicz | |
| 57 | 1 | Guillermo Zdanowicz | php artisan vendor:publish --tag=adminlte --force |
| 58 | 1 | Guillermo Zdanowicz | composer require --dev laravel/dusk:^2.0 |
| 59 | 2 | Guillermo Zdanowicz | |
| 60 | 2 | Guillermo Zdanowicz | La ruta del menu esta en |
| 61 | 2 | Guillermo Zdanowicz | |
| 62 | 2 | Guillermo Zdanowicz | /usr/share/nginx/html/titulos/resources/views/vendor/adminlte/layouts/partials |
| 63 | 2 | Guillermo Zdanowicz | |
| 64 | 2 | Guillermo Zdanowicz | |
| 65 | 2 | Guillermo Zdanowicz | el archivo es *sidebar.blade.php* |
| 66 | 3 | Guillermo Zdanowicz | |
| 67 | 3 | Guillermo Zdanowicz | |
| 68 | 3 | Guillermo Zdanowicz | En las vistas , por ejemplo en index |
| 69 | 3 | Guillermo Zdanowicz | |
| 70 | 3 | Guillermo Zdanowicz | @extends('adminlte::layouts.app') |
| 71 | 3 | Guillermo Zdanowicz | |
| 72 | 3 | Guillermo Zdanowicz | @section('htmlheader_title', 'Grupos') |
| 73 | 3 | Guillermo Zdanowicz | |
| 74 | 3 | Guillermo Zdanowicz | @section('contentheader_title', 'Grupos') |
| 75 | 3 | Guillermo Zdanowicz | |
| 76 | 3 | Guillermo Zdanowicz | @section('main-content') |