title: Setting Up Laravel in Ubuntu / DigitalOcean keywords: servers, laravel, coderstape, coder's tape description: Let's take a look at settting up a server from scratch for Laravel. date: April 1, 2019 tags: servers, laravel permalink: setting-up-laravel-in-ubuntu-digitalocean img: https://coderstape.com/storage/uploads/GZTXUbyGum2xeUZM9qBD5aPv8EKLwG3C8RGcRon4.jpeg author: Victor Gonzalez authorlink: https://github.com/vicgonvt
- Имена полей в ответе задавать в
snake_case
(prr_page
,created_at
,system_name
,...) - Для времени использовать
ISO 8601
(формат: YYYY-MM-DDTHH:MM:SSZ) - Отдавать данные (сам контент, поля сущностей, массивы сущностей), помещая их в
data
- GET: /api/users — получить список пользователей;
- GET: /api/users/123 — получить указанного пользователя;
- POST: /api/users — создать нового пользователя;
Note
to active Office without crack, just follow https://github.com/WindowsAddict/IDM-Activation-Script,
you wiil only need to run
irm https://massgrave.dev/ias | iex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http; | |
class HttpCode | |
{ | |
/* | |
* HTTP Status Codes & their meaning | |
* Source: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes | |
* By: Yentel Hollebeke - https://github.com/yentel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This can be found in the Symfony\Component\HttpFoundation\Response class | |
const HTTP_CONTINUE = 100; | |
const HTTP_SWITCHING_PROTOCOLS = 101; | |
const HTTP_PROCESSING = 102; // RFC2518 | |
const HTTP_OK = 200; | |
const HTTP_CREATED = 201; | |
const HTTP_ACCEPTED = 202; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// test new bot api | |
// start it as: | |
// gourbot "token:forBot" | |
// or | |
// BOT_TOKEN="token:forBot" gourbot | |
// | |
package main | |
import ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = []; | |
//$s = 123456; | |
$s = 's6tbdfgj222dJGk'; | |
$rs = str_repeat("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", 10); | |
$numGen = function() { | |
return rand(1, 9999999); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd ~ | |
$ sudo curl -sS https://getcomposer.org/installer | sudo php | |
$ sudo mv composer.phar /usr/local/bin/composer | |
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer | |
then you can run | |
$ sudo composer install |