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