Figured out a decent solution. Add to AppServiceProvider@register:
$this->app->bind('TCG\Voyager\Models\Post', function ($app) {
return new App\Post;
});
Create the new model that extends Voyager's model, and use a conditional addGlobalScope:
| sudo chown -R www-data:www-data . | |
| sudo usermod -a -G www-data admin | |
| sudo find . -type f -exec chmod 644 {} \; | |
| sudo find . -type d -exec chmod 755 {} \; | |
| sudo chgrp -R www-data storage bootstrap/cache | |
| sudo chmod -R ug+rwx storage bootstrap/cache |
| {"swagger": "2.0","info": { "version": "2018.11.6.114634","title": "SAK.Test.ApplicationLab","description": "A sample API that uses a Http2RpcProvider provider as an example to demonstrate features in SAK","license": {"name": "MIT"}},"host": "localhost:20319","basePath": "/","schemes": ["http"],"consumes": ["application/json"],"produces": ["application/json"],"paths": { "/apitestservice/v1/customers": {"get": { "operationId": "GetCustomers","summary": "Método: GetCustomers","produces": [ "application/json" ],"responses": { "200": { "description": "200 response" }}},"post": { "operationId": "PostCustomers","summary": "Método: PostCustomers","produces": [ "application/json" ],"responses": { "200": { "description": "200 response" }}}},"/apitestservice/v1/customers/:id": {"get": { "operationId": "GetSingleCustomers","summary": "Método: GetSingleCustomers","produces": [ "application/json" ],"responses": { "200": { "description": "200 response" }}},"post": { "operationId": "PostCustomersById","summary": "Método: P |
Figured out a decent solution. Add to AppServiceProvider@register:
$this->app->bind('TCG\Voyager\Models\Post', function ($app) {
return new App\Post;
});
Create the new model that extends Voyager's model, and use a conditional addGlobalScope:
| # Installation --- | |
| # 1. In Bitbucket, add $FTP_USERNAME $FTP_PASSWORD and $FTP_HOST as environment variables. | |
| # 2. Commit this file to your repo | |
| # 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will | |
| # push everything and initial GitFTP) | |
| # | |
| # Usage --- | |
| # - On each commit to master branch, it'll push all files to the $FTP_HOST | |
| # - You also have the option to 'init' (from Bitbucket Cloud) - pushes everything and initialises | |
| # - Finally you can also 'deploy-all' (from Bitbucket Cloud) - if multiple deploys fail, you |
| --- | |
| ip: "192.168.10.10" | |
| memory: 2048 | |
| cpus: 1 | |
| provider: virtualbox | |
| mongodb: true | |
| authorize: ~/.ssh/id_rsa.pub | |
| keys: |
| echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}' |
| { | |
| "result": { | |
| "totals": { | |
| "manpowers": "111.760,00", | |
| "materials": "123.325,01", | |
| "total": "235.085,01" | |
| }, | |
| "manpowers": [ | |
| { | |
| "id": 6, |
| C:\Program Files\Oracle\VirtualBox\VBOXMANAGE.EXE internalcommands sethduuid C:\Users\dcosta\VirtualBoxVMs\ubuntuMalk\ubuntuMalk.vdi |
| SELECT id, username, (total_point - spent_point) AS point | |
| FROM users | |
| ORDER BY point DESC | |
| LIMIT 50 | |
| INTO OUTFILE '/tmp/bbs_points_top50.csv' | |
| FIELDS TERMINATED BY ',' | |
| ENCLOSED BY '"' | |
| LINES TERMINATED BY '\n' | |
| ; |