intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

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

Chia sẻ: _ _ | Ngày: | Loại File: PDF | Số trang:15

29
lượt xem
4
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Laravel là một PHP framework mã nguồn mở và miễn phí, được phát triển bởi Taylor Otwell và nhắm vào mục tiêu hỗ trợ phát triển các ứng dụng web theo kiếm trúc model-view-controller (MVC). bài giảng này sẽ trình bày một số nội dung về Laravel, mời các bạn cùng tham khảo để biết thêm các nội dung chi tiết.

Chủ đề:
Lưu

Nội dung Text: Bài giảng Phát triển phần mềm nguồn mở: Bài 6 - Nguyễn Hữu Thể

  1. PHÁT TRIỂN PHẦN MỀM NGUỒN MỞ LARAVEL Nguyễn Hữu Thể
  2. 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. 2
  3. 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. 3
  4. 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 4
  5. 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 5.1 LTS 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
  6. Laravel – Installation − Server Requirements • PHP >= 5.6.4 • OpenSSL PHP Extension • PDO PHP Extension • Mbstring PHP Extension • Tokenizer PHP Extension • XML PHP Extension 6
  7. Laravel - Installation − Step 1 − Visit the following URL and download composer to install it on your system. − https://getcomposer.org/download/ − Step 2 − After the Composer is installed, check the installation by typing the Composer command in the command prompt as shown in the following screenshot. 7
  8. Laravel - Installation − Step 3 − 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: 8
  9. Laravel - Installation − Step 4 − Open URL in the browser http://localhost/MyProject Or http://localhost/MyProject/public 9
  10. 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
  11. 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
  12. Configuration − Additional Configuration • Timezone and locale • Cache • Database • Session − Configure your local environment: https://laravel.com/docs/5.3/configuration#environment-configuration 12
  13. 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
  14. 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
  15. 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
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
7=>1