laravel:安装laravel(10.27.0)
一,官方网站:
https://laravel.com/
中文文档可参见:
https://learnku.com/docs/laravel/10.x
二,用composer创建项目:
1,创建项目
liuhongdi@lhdpc:/data/laravel$ composer create-project --prefer-dist laravel/laravel dignews
2,运行刚创建好的项目
liuhongdi@lhdpc:/data/laravel/dignews$ php artisan serve
WARN Failed to listen on 127.0.0.1:8000 (reason: Address already in use).
WARN Failed to listen on 127.0.0.1:8001 (reason: Address already in use).
WARN Failed to listen on 127.0.0.1:8002 (reason: Address already in use).
WARN Failed to listen on 127.0.0.1:8003 (reason: Address already in use).
INFO Server running on [http://127.0.0.1:8004].
Press Ctrl+C to stop the server
说明:因为我电脑上的8000-8003这四个端口被占用了,laravel选择了可以使用的8004
如图:
三,测试效果:
说明:刘宏缔的架构森林—专注it技术的博客,
网站:https://blog.imgtouch.com
原文: https://blog.imgtouch.com/index.php/2023/10/16/laravel-an-zhuang-laravel-10-27/
代码: https://github.com/liuhongdi/ 或 https://gitee.com/liuhongdi
说明:作者:刘宏缔 邮箱: 371125307@qq.com
四,查看laravel框架的版本:
laravel
liuhongdi@lhdpc:/data/laravel/dignews$ php artisan --version
Laravel Framework 10.27.0
php
liuhongdi@lhdpc:/data/laravel/dignews$ php --version
PHP 8.1.1 (cli) (built: Dec 20 2021 16:12:16) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.1, Copyright (c) Zend Technologies