使⽤Laravel 8
PHP主流框架打造
RESTful APIRESTful API ⾃我介紹 • 王盛立 • 出版過⼀本 使⽤Laravel 8 PHP主流框架打造RESTful API(iT邦幫忙鐵⼈賽系列書) • 浪浪的事 Side Project https://langlangthing.com/ 今⽇菜單 ⾃我介紹 RESTful API Laravel程式範例說明 延伸補充資料 前後端分離 WEB API RESTful RESTful API 是什麼 Representational state transfer (REST) 表現層狀態轉換 Client Server REQUEST RESPONSE GET https://localhost/api/v1/articles/1 HTTP STATUS : 200 OK HTTP 協定 HTTP VERBS. URL. HTTP STATUS. 14:07:22", "updated_at": "2021-09-08 14:07:22" } } 201 CREATED https://localhost/api/v1/articles Headers Headers Body Body REQUEST RESPONSE JSON Accept : application/json Content-Type0 码力 | 22 页 | 3.41 MB | 1 年前3
CakePHP Cookbook 2.x
request cycle Benefits Where to Get Help The Official CakePHP website The Cookbook The Bakery The API The Test Cases The IRC channel Official CakePHP Forum Stackoverflow Where to get Help in your Language Element Caching Elements Requesting Elements from a Plugin 2.0 2.1 Creating your own view classes View API More about Views Themes Media Views JSON and XML views Helpers Models Understanding Models More ConsoleOptionParser from an array Getting help from shells Getting help as XML Routing in shells / CLI Shell API More topics Shell Helpers Running Shells as cronjobs Completion Shell Code Generation with Bake Schema0 码力 | 1096 页 | 958.62 KB | 1 年前3
CakePHP Cookbook 2.x
classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 View API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547 Shell API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (that is, the index action of the posts controller). You can refer to Router::url() function on the API10 to see the formats in which you can specify a URL for various CakePHP functions. Calling the save()0 码力 | 820 页 | 2.52 MB | 1 年前3
Learning LaravelCommunity 2 Featured Tutorial 2 Contribution Guidelines 2 Contribution Style Guide 2 About Laravel 2 Main Features 2 MVC 2 Blade Templating Engine 3 Routing & Middleware 3 Artisan 3 Eloquent ORM 3 Event routing behaviour in Laravel 5.2.31 + 28 Syntax 28 Parameters 28 Remarks 28 Examples 28 Adding api-routes with other middleware and keep default web middleware 28 Chapter 8: Collections 30 Syntax Configuration 168 Basic Usage - Facade 168 Basic Usage - Dependency Injection 169 Socialite for API - Stateless 169 Chapter 58: Sparkpost integration with Laravel 5.4 171 Introduction 171 Examples0 码力 | 216 页 | 1.58 MB | 1 年前3
CakePHP Cookbook 4.x
Levels Logging Scopes Logging to Files Logging to Syslog Creating Log Engines Logging Formatters Log API Log Convenience Methods Logging Trait LogTrait Using Monolog Modelless Forms Form Creating a Collections Making Collections Rewindable Cloning Collections Folder & File Basic Usage Folder API Folder File API File Hash Hash Hash Path Syntax Expression Types Attribute Matching Types Http Client but will remain longer – and you’ll also be lightening our support load. Both the manual and the API have an online component. The Bakery https://bakery.cakephp.org The CakePHP Bakery is a clearing0 码力 | 1249 页 | 1.04 MB | 1 年前3
CakePHP Cookbook 3.x
Streams Using the FileLog Adapter Logging to Syslog Writing to Logs Using Levels Logging Scopes Log API Convenience Methods Logging Trait Using Monolog Modelless Forms Creating a Form Setting Form Values Collections Making Collections Rewindable Cloning Collections Folder & File Basic Usage Folder API File API Hash Hash Path Syntax Expression Types Attribute Matching Types Http Client Doing Requests but will remain longer – and you’ll also be lightening our support load. Both the manual and the API have an online component. The Bakery https://bakery.cakephp.org The CakePHP Bakery is a clearing0 码力 | 1244 页 | 1.05 MB | 1 年前3
CakePHP Cookbook 3.x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747 Log API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863 Folder API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864 File API . . . . . . . . . . . . . . . . . . . . but will remain longer – and you’ll also be lightening our support load. Both the manual and the API have an online component. The Bakery https://bakery.cakephp.org The CakePHP Bakery is a clearing0 码力 | 967 页 | 2.80 MB | 1 年前3
CakePHP Cookbook 4.x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728 Log API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853 Folder API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854 File API . . . . . . . . . . . . . . . . . . . . but will remain longer – and you’ll also be lightening our support load. Both the manual and the API have an online component. The Bakery https://bakery.cakephp.org The CakePHP Bakery is a clearing0 码力 | 967 页 | 2.88 MB | 1 年前3
Laravel 5.3 中文文档........................................................................................ 261 8.4 API 认证(Passport) ..................................................................................... Webpack;“可邮寄”的对象;明确分离 web 和 api 路由;基于闭包的控制台命令;存储上传文件的辅助函数;支持 POPO 和单动作控制 器;以及优化前端脚手架;等等等等。 通知(Notifications) 注:Laracasts 上有关于此特性的免费视频教程。 Laravel Notifications 为我们提供了简单、优雅的 API 用于在不同的发行渠道中发送通知,例如邮 件、SMS、Slack Echo,通过 NPM 安装的全新的 JavaScript 包,将和 Laravel 5.3 一起发布,用于为订阅频 道以及在客户端 JavaScript 应用中监听服务器端事件提供了简单、优美的 API,Echo 包含对 Pusher 和 Socket.io 的支持: Echo.channel('orders.' + orderId) .listen('ShippingStatusUpdated'0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 6.0 中文文档php、 api.php、 console.php 和 channels.php。 web.php 文件包含的路由通过 RouteServiceProvider 引入,都被 约束在 web 中间件组中,因而支持 Session、CSRF 保护以及 Cookie 加密功能,如果应用无需提供无状态的、RESTful 风格的 API,那么路由基本上都要定义在 web.php 文件中。 api.php php 文件包含的路由通过 RouteServiceProvider 引入,都被 约束在 api 中间件组中,因而支持频率限制功能,这些路由是无状 态的,所以请求通过这些路由进入应用需要通过 token 进行认证并 且不能访问 Session 状态。 console.php 文件用于定义所有基于闭包的控制台命令,每个闭包 都被绑定到一个控制台命令并且允许与命令行 IO 方法进行交互,尽 管这个文件并不定义 Composer 通过 PSR-4 自动载入标准 自动加 载。 app 目录下包含多个子目录,如 Console、Http、Providers 等。 Console 和 Http 目录提供了进入应用核心的 API,HTTP 协议和 CLI 是和应用进行交互的两种机制,但实际上并不包含应用逻辑。换 句话说,它们只是两个向应用发送命令的方式。Console 目录包含了 所有开发者编写的 Artisan 命令,Http0 码力 | 1442 页 | 14.66 MB | 1 年前3
共 84 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9













