1. Trang chủ
  2. » Công Nghệ Thông Tin

Bài giảng Phát triển phần mềm nguồn mở (GV Nguyễn Hữu Thể) Bài 6

15 7 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 15
Dung lượng 286,39 KB

Nội dung

PHÁT TRIỂN PHẦN MỀM NGUỒN MỞ LARAVEL Nguyễn Hữu Thể Laravel − A powerful MVC PHP framework − Designed for developers who need a simple and elegant toolkit to create full-featured web applications − Laravel was created by Taylor Otwell Laravel − Laravel is a MVC framework • Incorporates many of the best features of frameworks like CodeIgniter, Yii, ASP.NET MVC, Ruby on Rails, Sinatra, and others − Laravel is an Open Source framework • It has a very rich set of features which will boost the speed of Web Development Laravel – Features − − − − − − − − − − − − Modularity Testability Routing Configuration management Query builder and ORM (Object Relational Mapper) Schema builder, migrations, and seeding Template engine E-mailing Authentication Redis Queues Event and command bus Laravel – Version Version Release date PHP version 1.0 June 2011 2.0 September 2011 3.0 February 22, 2012 3.1 March 27, 2012 3.2 May 22, 2012 4.0 May 28, 2013 ≥ 5.3.0 4.1 December 12, 2013 ≥ 5.3.0 4.2 June 1, 2014 ≥ 5.4.0 5.0 February 4, 2015 ≥ 5.4.0 June 9, 2015 ≥ 5.5.9 5.2 December 21, 2015 ≥ 5.5.9 5.3 August 23, 2016 ≥ 5.6.4 5.4 January 24, 2017 ≥ 5.6.4 5.5 LTS August 30, 2017 ≥ 7.0.0 5.6 February 7, 2018 ≥ 7.1.3 5.7 September 4, 2018 ≥ 7.1.3 5.1 LTS Laravel – Installation − Server Requirements • • • • • • PHP >= 5.6.4 OpenSSL PHP Extension PDO PHP Extension Mbstring PHP Extension Tokenizer PHP Extension XML PHP Extension Laravel - Installation − Step − Visit the following URL and download composer to install it on your system − https://getcomposer.org/download/ − Step − After the Composer is installed, check the installation by typing the Composer command in the command prompt as shown in the following screenshot Laravel - Installation − Step − Move to path where you have created the new directory and type the following command there to install Laravel composer create-project prefer-dist laravel/laravel MyProject Successfully: Laravel - Installation − Step − Open URL in the browser http://localhost/MyProject Or http://localhost/MyProject/public Configuration − Public Directory • Web server's document / web root to be the public directory • The index.php in this directory serves as the front controller for all HTTP requests entering your application − Configuration Files • All of the configuration files for the Laravel framework are stored in the config directory − Directory Permissions • Directories within the storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run 10 Configuration − Application Key • Set your application key to a random string • If you installed Laravel via Composer or the Laravel installer, this key has already been set for you by the php artisan key: generate command • Typically, this string should be 32 characters long • The key can be set in the env environment file • Renamed the env.example file to env • If the application key is not set, your user sessions and other encrypted data will not be secure! 11 Configuration − Additional Configuration • • • • Timezone and locale Cache Database Session − Configure your local environment: https://laravel.com/docs/5.3/configuration#environment-configuration 12 Application structure − The default Laravel application structure is intended to provide a great starting point for both large and small applications − You are free to organize your application however you like − Laravel imposes almost no restrictions on where any given class is located - as long as Composer can autoload the class 13 Root Directory − − − − − − − − − − app − the core code of the application bootstrap − the application bootstrapping script config − configuration files of application database − your database migration and seeds public − The application’s document root It starts the Laravel application JavaScript, CSS, Images, resources − raw assets such as the LESS & Sass files, localization and language files routes - all of the route definitions for your application By default, three route files are included with Laravel: web.php, api.php, and console.php storage − App storage, like file uploads Framework storage (cache), and application-generated logs test − various test cases vendor − composer dependencies 14 App Directory − Console − All the artisan commands are stored in this directory − Exceptions − Contains your application's exception handler − Http − Contains your controllers, filters, and requests − Providers − Contains various service providers 15 ... 2015 ≥ 5.5.9 5.2 December 21, 2015 ≥ 5.5.9 5.3 August 23, 20 16 ≥ 5 .6. 4 5.4 January 24, 2017 ≥ 5 .6. 4 5.5 LTS August 30, 2017 ≥ 7.0.0 5 .6 February 7, 2018 ≥ 7.1.3 5.7 September 4, 2018 ≥ 7.1.3 5.1... September 4, 2018 ≥ 7.1.3 5.1 LTS Laravel – Installation − Server Requirements • • • • • • PHP >= 5 .6. 4 OpenSSL PHP Extension PDO PHP Extension Mbstring PHP Extension Tokenizer PHP Extension XML PHP

Ngày đăng: 30/10/2021, 11:09

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w