INSERT INTO `tasks` (`id`, `task`, `status`, `created_at`) VALUES Insert some sample data into the tasks table: `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMPĪLTER TABLE `tasks` ADD PRIMARY KEY (`id`) ĪLTER TABLE `tasks` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT `status` tinyint(1) NOT NULL DEFAULT '1', ![]() Now You can run it with PHP’s built-in web server or you can point your browser with full URL.Īfter going through the above steps, if you point your browser to, you would have following output in the browser – The above command will create a project using Slim-Skeleton application Replace with the desired directory name for your new application. $ composer create-project slim/slim-skeleton ![]() If you are using Composer, the PHP dependency manager, simply issue the following command: This article explains Slim Framework in detail, illustrating how you can use it to rapidly build and deploy a REST API with support for authentication and multiple request/response formats. It supports all (GET, POST, PUT, DELETE) the HTTP methods. It comes with a sophisticated URL dispatcher and middleware architecture that makes it perfect for static websites or API prototyping. Slim is a full-featured, open-source PHP micro-framework that enables you to write ‘simple yet powerful’ web applications and APIs in a quick manner.
0 Comments
Leave a Reply. |