-
Notifications
You must be signed in to change notification settings - Fork 0
/
.todo
93 lines (76 loc) · 2.14 KB
/
.todo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
TODO See this info and if everything is ok delete this line or delete this file
//////////////////////////////////////////////////////////////////
///////////// PHP Web Services //////////////////////////////////
////////////////////////////////////////////////////////////////
// Editar .env
APP_KEY={chave com 32 caracteres}
DB_CONNECTION=sqlite
#DB_HOST=localhost
#DB_PORT=3306
#DB_DATABASE=homestead
#DB_USERNAME=homestead
#DB_PASSWORD=secret
// Cria arquivo SQLite
touch database\database.sqlite
// Inicia servidor
php -S localhost:8000 -t public public/index.php
// Habilitar SQLite e Soap em php.ini
>>>> php --ini
>>>> return phpversion();
extension=php_pdo_sqlite.dll
extension=php_soap.dll
// Dados iniciais
php artisan migrate
php artisan db:seed
//////////////////////////////// APACHE SOAP ////////////////
// Apache (VirtualHost):
##Webserver - Fornece
<VirtualHost *:80>
ServerName son-soap.dev
DocumentRoot "C:/.../public"
<Directory "C:/.../public">
##Allow from all
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
##API - Consome
<VirtualHost *:80>
ServerName cesar-soap.dev
DocumentRoot "C:/.../public"
<Directory "C:/.../public">
##Allow from all
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
// Windows (.host):
127.0.0.1 son-soap.dev
127.0.0.1 cesar-soap.dev
// Lumen (routes.php):
$uri = 'http://son-soap.dev';
// Browser (Link):
http://son-soap.dev/son-soap.wsdl
http://cesar-soap.dev/son-soap.wsdl
///////////////////////// Reparo na função create() - SOAP ///////////////
/**
*
* @param \App\Types\ClientType $type
*
* @return string
*
*/
public function create($type)
{
$data = new ClientType;
$data->name = $type->name;
$data->email = $type->email;
$data->phone = $type->phone;
// return serialize($type);
// return $type->name;
// return gettype($type);
$client = Client::create((array)$data);
return $this->getXML($client);
}