Una vez creada la máquina virtual, se debe crear la base de datos correspondiente y ejecutar los comandos
php artisan migrate
php artisan db:seed
Configuración inicial para ejecutar despues de que la máquina virtual estuvo pausada
Command line:
sudo service mysql start &&
cd ${current.project.path} &&
cp .env.example .env &&
composer update &&
php artisan key:generate &&
php artisan serve --host=0.0.0.0 --port=3000
Preview URL:
http://${server.port.3000}
Configuración normal, una vez que ya está en funcionamiento el proyecto
Command line:
cd ${current.project.path} && php artisan serve --host=0.0.0.0 --port=3000
Preview URL:
http://${server.port.3000}
composer create-project --prefer-dist laravel/laravel pizzas
php artisan migrate
php artisan make:model Pizza -mc
php artisan migrate
$table->string('nombre');
$table->integer('precio');
$table->string('tipo');
php artisan tinker
use App\Pizza;
$pizzas = Pizza::all();
return view('pizzas.index', compact('pizzas'));
<?php foreach ($pizzas as $pizza) : ?>
<li><?= $pizza->nombre ?></li>
<?php endforeach ?>
@foreach ($pizzas as $pizza)
<li>{{$pizza->nombre}}</li>
@endforeach
@foreach ($pizzas as $pizza)
<tr id='{{$pizza->id}}'>
<td><input type="checkbox"></td>
<td>{{$pizza->nombre}}</td>
<td>{{$pizza->precio}}</td>
</tr>
@endforeach
Route::get('/pizzas', 'PizzaController@index');
Route::get('/pizzas/json', 'PizzaController@json');
public function json() {
return Pizza::all();
}
wget https://raw.githubusercontent.com/iaw-dcic/js-dom/master/images/background-760x760.jpg
wget https://raw.githubusercontent.com/iaw-dcic/js-dom/master/images/background-wood.jpg
wget https://raw.githubusercontent.com/iaw-dcic/js-dom/master/images/pattern.png
$(function() {
$.ajax({
url: "/pizzas/json",
context: document.body,
success: function (data) {
pedido = data;
mostrarPizzas(ordenarPizzas(data));
}
});
});
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as:
- Simple, fast routing engine.
- Powerful dependency injection container.
- Multiple back-ends for session and cache storage.
- Expressive, intuitive database ORM.
- Database agnostic schema migrations.
- Robust background job processing.
- Real-time event broadcasting.
Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb combination of simplicity, elegance, and innovation give you tools you need to build any application with which you are tasked.
Laravel has the most extensive and thorough documentation and video tutorial library of any modern web application framework. The Laravel documentation is thorough, complete, and makes it a breeze to get started learning the framework.
If you're not in the mood to read, Laracasts contains over 900 video tutorials on a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library.
We would like to extend our thanks to the following sponsors for helping fund on-going Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Patreon page:
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed.
The Laravel framework is open-sourced software licensed under the MIT license.