Merge branch 'release/0.3'
This commit is contained in:
commit
3bb27d878d
148 changed files with 2527 additions and 2115 deletions
18
.editorconfig
Normal file
18
.editorconfig
Normal file
|
@ -0,0 +1,18 @@
|
|||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
# Tab indentation
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
tab_width = 4
|
14
.env.dusk.testing
Normal file
14
.env.dusk.testing
Normal file
|
@ -0,0 +1,14 @@
|
|||
APP_ENV=testing
|
||||
APP_DEBUG=true
|
||||
APP_KEY=base64:6DJhvZLVjE6dD4Cqrteh+6Z5vZlG+v/soCKcDHLOAH0=
|
||||
APP_URL=http://localhost:8000
|
||||
APP_LONGURL=localhost
|
||||
APP_SHORTURL=local
|
||||
|
||||
DB_CONNECTION=travis
|
||||
|
||||
CACHE_DRIVER=array
|
||||
SESSION_DRIVER=file
|
||||
QUEUE_DRIVER=sync
|
||||
|
||||
SCOUT_DRIVER=pgsql
|
|
@ -1,5 +1,6 @@
|
|||
APP_ENV=testing
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_KEY=base64:6DJhvZLVjE6dD4Cqrteh+6Z5vZlG+v/soCKcDHLOAH0=
|
||||
APP_URL=http://localhost:8000
|
||||
APP_LONGURL=localhost
|
||||
APP_SHORTURL=local
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -10,3 +10,4 @@ Homestead.json
|
|||
/public/files
|
||||
/public/keybase.txt
|
||||
/coverage
|
||||
/LegacyTests
|
||||
|
|
|
@ -2,6 +2,7 @@ preset: laravel
|
|||
|
||||
disabled:
|
||||
- concat_without_spaces
|
||||
- simplified_null_return
|
||||
|
||||
finder:
|
||||
path: app/
|
||||
|
|
30
.travis.yml
30
.travis.yml
|
@ -3,8 +3,23 @@ language: php
|
|||
sudo: false
|
||||
dist: trusty
|
||||
|
||||
cache:
|
||||
- apt
|
||||
|
||||
addons:
|
||||
postgresql: "9.5"
|
||||
postgresql: "9.6"
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'deb http://ppa.launchpad.net/nginx/development/ubuntu trusty main'
|
||||
packages:
|
||||
- nginx
|
||||
- realpath
|
||||
artifacts:
|
||||
s3_region: "eu-west-1"
|
||||
paths:
|
||||
- $(ls tests/Browser/screenshots/*.png | tr "\n" ":")
|
||||
- $(ls tests/Browser/console/*.log | tr "\n" ":")
|
||||
- $(ls /tmp/*.log | tr "\n" ":")
|
||||
|
||||
services:
|
||||
- postgresql
|
||||
|
@ -14,7 +29,6 @@ env:
|
|||
- setup=basic
|
||||
|
||||
php:
|
||||
- 7.0.15
|
||||
- 7.1
|
||||
- nightly
|
||||
matrix:
|
||||
|
@ -22,13 +36,17 @@ matrix:
|
|||
- php: nightly
|
||||
|
||||
before_install:
|
||||
- phpenv config-rm xdebug.ini || echo "xdebug already absent"
|
||||
- mkdir travis-phantomjs
|
||||
- wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
|
||||
- tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs
|
||||
- export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
|
||||
- travis_retry composer self-update --preview
|
||||
|
||||
install:
|
||||
- if [[ $setup = 'basic' ]]; then travis_retry composer install --no-interaction --prefer-dist; fi
|
||||
- if [[ $setup = 'stable' ]]; then travis_retry composer update --no-interaction --prefer-dist --prefer-stable; fi
|
||||
- if [[ $setup = 'lowest' ]]; then travis_retry composer update --no-interaction --prefer-dist --prefer-lowest --prefer-stable; fi
|
||||
- travis/install-nginx.sh
|
||||
|
||||
before_script:
|
||||
- psql -U travis -c 'create database travis_ci_test'
|
||||
|
@ -37,10 +55,10 @@ before_script:
|
|||
- php artisan key:generate
|
||||
- php artisan migrate
|
||||
- php artisan db:seed
|
||||
- php artisan token:generate
|
||||
- php artisan serve &
|
||||
- phantomjs --webdriver=127.0.0.1:9515 --webdriver-loglevel=DEBUG &
|
||||
- sleep 5 # Give artisan some time to start serving
|
||||
|
||||
script:
|
||||
- phpdbg -qrr vendor/bin/phpunit --coverage-text
|
||||
- php vendor/bin/phpunit --coverage-text
|
||||
- php artisan dusk
|
||||
- php artisan security:check
|
||||
|
|
3
Makefile
3
Makefile
|
@ -3,7 +3,8 @@
|
|||
.PHONY: sass frontend js compress lint-sass lint-js
|
||||
jsfiles := $(wildcard resources/assets/js/*.js)
|
||||
sassfiles := $(wildcard resources/assets/sass/*.scss)
|
||||
yarnfiles:= node_modules/mapbox-gl/dist/mapbox-gl.css
|
||||
yarnfiles:= node_modules/mapbox-gl/dist/mapbox-gl.css \
|
||||
node_modules/alertify.js/dist/css/alertify.css
|
||||
assets := public/assets/css/app.css \
|
||||
public/assets/prism/prism.css public/assets/prism/prism.js \
|
||||
$(wildcard public/assets/js/*.js) \
|
||||
|
|
|
@ -47,8 +47,8 @@ class GenerateToken extends Command
|
|||
public function handle(TokenService $tokenService)
|
||||
{
|
||||
$data = [
|
||||
'me' => env('APP_URL'),
|
||||
'client_id' => env('APP_URL') . '/notes/new',
|
||||
'me' => config('app.url'),
|
||||
'client_id' => route('micropub-client'),
|
||||
'scope' => 'post',
|
||||
];
|
||||
$token = $tokenService->getNewToken($data);
|
||||
|
|
|
@ -1,63 +1,35 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Article;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class ArticlesAdminController extends Controller
|
||||
class ArticlesController extends Controller
|
||||
{
|
||||
/**
|
||||
* Show the new article form.
|
||||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function newArticle()
|
||||
{
|
||||
$message = session('message');
|
||||
|
||||
return view('admin.newarticle', ['message' => $message]);
|
||||
}
|
||||
|
||||
/**
|
||||
* List the articles that can be edited.
|
||||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function listArticles()
|
||||
public function index()
|
||||
{
|
||||
$posts = Article::select('id', 'title', 'published')->orderBy('id', 'desc')->get();
|
||||
|
||||
return view('admin.listarticles', ['posts' => $posts]);
|
||||
return view('admin.articles.list', ['posts' => $posts]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the edit form for an existing article.
|
||||
* Show the new article form.
|
||||
*
|
||||
* @param string The article id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function editArticle($articleId)
|
||||
public function create()
|
||||
{
|
||||
$post = Article::select(
|
||||
'title',
|
||||
'main',
|
||||
'url',
|
||||
'published'
|
||||
)->where('id', $articleId)->get();
|
||||
$message = session('message');
|
||||
|
||||
return view('admin.editarticle', ['id' => $articleId, 'post' => $post]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the delete confirmation form for an article.
|
||||
*
|
||||
* @param string The article id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function deleteArticle($articleId)
|
||||
{
|
||||
return view('admin.deletearticle', ['id' => $articleId]);
|
||||
return view('admin.articles.new', ['message' => $message]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -66,7 +38,7 @@ class ArticlesAdminController extends Controller
|
|||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function postNewArticle(Request $request)
|
||||
public function store(Request $request)
|
||||
{
|
||||
$published = $request->input('published');
|
||||
if ($published == null) {
|
||||
|
@ -99,17 +71,35 @@ class ArticlesAdminController extends Controller
|
|||
throw $e;
|
||||
}
|
||||
|
||||
return view('admin.newarticlesuccess', ['id' => $article->id, 'title' => $article->title]);
|
||||
return view('admin.articles.newsuccess', ['id' => $article->id, 'title' => $article->title]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the edit form for an existing article.
|
||||
*
|
||||
* @param string The article id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function edit($articleId)
|
||||
{
|
||||
$post = Article::select(
|
||||
'title',
|
||||
'main',
|
||||
'url',
|
||||
'published'
|
||||
)->where('id', $articleId)->get();
|
||||
|
||||
return view('admin.articles.edit', ['id' => $articleId, 'post' => $post]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process an incoming request to edit an article.
|
||||
*
|
||||
* @param string
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param string
|
||||
* @return \Illuminate|View\Factory view
|
||||
*/
|
||||
public function postEditArticle($articleId, Request $request)
|
||||
public function update(Request $request, $articleId)
|
||||
{
|
||||
$published = $request->input('published');
|
||||
if ($published == null) {
|
||||
|
@ -122,7 +112,18 @@ class ArticlesAdminController extends Controller
|
|||
$article->published = $published;
|
||||
$article->save();
|
||||
|
||||
return view('admin.editarticlesuccess', ['id' => $articleId]);
|
||||
return view('admin.articles.editsuccess', ['id' => $articleId]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the delete confirmation form for an article.
|
||||
*
|
||||
* @param string The article id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function delete($articleId)
|
||||
{
|
||||
return view('admin.articles.delete', ['id' => $articleId]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -131,10 +132,10 @@ class ArticlesAdminController extends Controller
|
|||
* @param string The article id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function postDeleteArticle($articleId)
|
||||
public function destroy($articleId)
|
||||
{
|
||||
Article::where('id', $articleId)->delete();
|
||||
|
||||
return view('admin.deletearticlesuccess', ['id' => $articleId]);
|
||||
return view('admin.articles.deletesuccess', ['id' => $articleId]);
|
||||
}
|
||||
}
|
|
@ -1,21 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\MicropubClient;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class ClientsAdminController extends Controller
|
||||
class ClientsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Show a list of known clients.
|
||||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function listClients()
|
||||
public function index()
|
||||
{
|
||||
$clients = MicropubClient::all();
|
||||
|
||||
return view('admin.listclients', ['clients' => $clients]);
|
||||
return view('admin.clients.list', ['clients' => $clients]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,25 +24,9 @@ class ClientsAdminController extends Controller
|
|||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function newClient()
|
||||
public function create()
|
||||
{
|
||||
return view('admin.newclient');
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the request to adda new client name.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function postNewClient(Request $request)
|
||||
{
|
||||
MicropubClient::create([
|
||||
'client_url' => $request->input('client_url'),
|
||||
'client_name' => $request->input('client_name'),
|
||||
]);
|
||||
|
||||
return view('admin.newclientsuccess');
|
||||
return view('admin.clients.new');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -50,17 +35,33 @@ class ClientsAdminController extends Controller
|
|||
* @param string The client id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function editClient($clientId)
|
||||
public function edit($clientId)
|
||||
{
|
||||
$client = MicropubClient::findOrFail($clientId);
|
||||
|
||||
return view('admin.editclient', [
|
||||
return view('admin.clients.edit', [
|
||||
'id' => $clientId,
|
||||
'client_url' => $client->client_url,
|
||||
'client_name' => $client->client_name,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the request to adda new client name.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
MicropubClient::create([
|
||||
'client_url' => $request->input('client_url'),
|
||||
'client_name' => $request->input('client_name'),
|
||||
]);
|
||||
|
||||
return view('admin.clients.newsuccess');
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the request to edit a client name.
|
||||
*
|
||||
|
@ -68,7 +69,7 @@ class ClientsAdminController extends Controller
|
|||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function postEditClient($clientId, Request $request)
|
||||
public function update($clientId, Request $request)
|
||||
{
|
||||
$client = MicropubClient::findOrFail($clientId);
|
||||
if ($request->input('edit')) {
|
||||
|
@ -76,12 +77,12 @@ class ClientsAdminController extends Controller
|
|||
$client->client_name = $request->input('client_name');
|
||||
$client->save();
|
||||
|
||||
return view('admin.editclientsuccess');
|
||||
return view('admin.clietns.editsuccess');
|
||||
}
|
||||
if ($request->input('delete')) {
|
||||
$client->delete();
|
||||
|
||||
return view('admin.deleteclientsuccess');
|
||||
return view('admin.clients.deletesuccess');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,34 +1,35 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Contact;
|
||||
use GuzzleHttp\Client;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Filesystem\Filesystem;
|
||||
|
||||
class ContactsAdminController extends Controller
|
||||
class ContactsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display the form to add a new contact.
|
||||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function newContact()
|
||||
{
|
||||
return view('admin.newcontact');
|
||||
}
|
||||
|
||||
/**
|
||||
* List the currect contacts that can be edited.
|
||||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function listContacts()
|
||||
public function index()
|
||||
{
|
||||
$contacts = Contact::all();
|
||||
|
||||
return view('admin.listcontacts', ['contacts' => $contacts]);
|
||||
return view('admin.contacts.list', ['contacts' => $contacts]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the form to add a new contact.
|
||||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('admin.contacts.new');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -37,11 +38,11 @@ class ContactsAdminController extends Controller
|
|||
* @param string The contact id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function editContact($contactId)
|
||||
public function edit($contactId)
|
||||
{
|
||||
$contact = Contact::findOrFail($contactId);
|
||||
|
||||
return view('admin.editcontact', ['contact' => $contact]);
|
||||
return view('admin.contacts.edit', ['contact' => $contact]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -49,9 +50,9 @@ class ContactsAdminController extends Controller
|
|||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function deleteContact($contactId)
|
||||
public function delete($contactId)
|
||||
{
|
||||
return view('admin.deletecontact', ['id' => $contactId]);
|
||||
return view('admin.contacts.delete', ['id' => $contactId]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -60,7 +61,7 @@ class ContactsAdminController extends Controller
|
|||
* @param \Illuminate\Http|request $request
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function postNewContact(Request $request)
|
||||
public function store(Request $request)
|
||||
{
|
||||
$contact = new Contact();
|
||||
$contact->name = $request->input('name');
|
||||
|
@ -70,7 +71,7 @@ class ContactsAdminController extends Controller
|
|||
$contact->facebook = $request->input('facebook');
|
||||
$contact->save();
|
||||
|
||||
return view('admin.newcontactsuccess', ['id' => $contact->id]);
|
||||
return view('admin.contacts.newsuccess', ['id' => $contact->id]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -82,7 +83,7 @@ class ContactsAdminController extends Controller
|
|||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function postEditContact($contactId, Request $request)
|
||||
public function update($contactId, Request $request)
|
||||
{
|
||||
$contact = Contact::findOrFail($contactId);
|
||||
$contact->name = $request->input('name');
|
||||
|
@ -104,7 +105,7 @@ class ContactsAdminController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
return view('admin.editcontactsuccess');
|
||||
return view('admin.contacts.editsuccess');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -113,12 +114,12 @@ class ContactsAdminController extends Controller
|
|||
* @param string The contact id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function postDeleteContact($contactId)
|
||||
public function destroy($contactId)
|
||||
{
|
||||
$contact = Contact::findOrFail($contactId);
|
||||
$contact->delete();
|
||||
|
||||
return view('admin.deletecontactsuccess');
|
||||
return view('admin.contacts.deletesuccess');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -162,7 +163,7 @@ class ContactsAdminController extends Controller
|
|||
}
|
||||
$filesystem->put($directory . '/image', $avatar->getBody());
|
||||
|
||||
return view('admin.getavatarsuccess', ['homepage' => parse_url($homepage)['host']]);
|
||||
return view('admin.contacts.getavatarsuccess', ['homepage' => parse_url($homepage)['host']]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Note;
|
||||
use Validator;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Jobs\SendWebMentions;
|
||||
use App\Services\NoteService;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class NotesAdminController extends Controller
|
||||
class NotesController extends Controller
|
||||
{
|
||||
protected $noteService;
|
||||
|
||||
|
@ -17,40 +18,29 @@ class NotesAdminController extends Controller
|
|||
$this->noteService = $noteService ?? new NoteService();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form to make a new note.
|
||||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function newNotePage()
|
||||
{
|
||||
return view('admin.newnote');
|
||||
}
|
||||
|
||||
/**
|
||||
* List the notes that can be edited.
|
||||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function listNotesPage()
|
||||
public function index()
|
||||
{
|
||||
$notes = Note::select('id', 'note')->orderBy('id', 'desc')->get();
|
||||
foreach ($notes as $note) {
|
||||
$note->originalNote = $note->getOriginal('note');
|
||||
}
|
||||
|
||||
return view('admin.listnotes', ['notes' => $notes]);
|
||||
return view('admin.notes.list', ['notes' => $notes]);
|
||||
}
|
||||
|
||||
/**
|
||||
* The delete note page.
|
||||
* Show the form to make a new note.
|
||||
*
|
||||
* @param int id
|
||||
* @return view
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function deleteNotePage($id)
|
||||
public function create()
|
||||
{
|
||||
return view('admin.deletenote', ['id' => $id]);
|
||||
return view('admin.notes.new');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -59,12 +49,23 @@ class NotesAdminController extends Controller
|
|||
* @param string The note id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function editNotePage($noteId)
|
||||
public function edit($noteId)
|
||||
{
|
||||
$note = Note::find($noteId);
|
||||
$note->originalNote = $note->getOriginal('note');
|
||||
|
||||
return view('admin.editnote', ['id' => $noteId, 'note' => $note]);
|
||||
return view('admin.notes.edit', ['id' => $noteId, 'note' => $note]);
|
||||
}
|
||||
|
||||
/**
|
||||
* The delete note page.
|
||||
*
|
||||
* @param int id
|
||||
* @return view
|
||||
*/
|
||||
public function delete($noteId)
|
||||
{
|
||||
return view('admin.notes.delete', ['id' => $id]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -73,7 +74,7 @@ class NotesAdminController extends Controller
|
|||
* @param Illuminate\Http\Request $request
|
||||
* @todo Sort this mess out
|
||||
*/
|
||||
public function createNote(Request $request)
|
||||
public function store(Request $request)
|
||||
{
|
||||
$validator = Validator::make(
|
||||
$request->all(),
|
||||
|
@ -86,9 +87,21 @@ class NotesAdminController extends Controller
|
|||
->withInput();
|
||||
}
|
||||
|
||||
$note = $this->noteService->createNote($request);
|
||||
$data = [];
|
||||
$data['content'] = $request->input('content');
|
||||
$data['in-reply-to'] = $request->input('in-reply-to');
|
||||
$data['location'] = $request->input('location');
|
||||
$data['syndicate'] = [];
|
||||
if ($request->input('twitter')) {
|
||||
$data['syndicate'][] = 'twitter';
|
||||
}
|
||||
if ($request->input('facebook')) {
|
||||
$data['syndicate'][] = 'facebook';
|
||||
}
|
||||
|
||||
return view('admin.newnotesuccess', [
|
||||
$note = $this->noteService->createNote($data);
|
||||
|
||||
return view('admin.notes.newsuccess', [
|
||||
'id' => $note->id,
|
||||
'shorturl' => $note->shorturl,
|
||||
]);
|
||||
|
@ -101,7 +114,7 @@ class NotesAdminController extends Controller
|
|||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function editNote($noteId, Request $request)
|
||||
public function update($noteId, Request $request)
|
||||
{
|
||||
//update note data
|
||||
$note = Note::findOrFail($noteId);
|
||||
|
@ -113,7 +126,7 @@ class NotesAdminController extends Controller
|
|||
dispatch(new SendWebMentions($note));
|
||||
}
|
||||
|
||||
return view('admin.editnotesuccess', ['id' => $noteId]);
|
||||
return view('admin.notes.editsuccess', ['id' => $noteId]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -122,11 +135,11 @@ class NotesAdminController extends Controller
|
|||
* @param int id
|
||||
* @return view
|
||||
*/
|
||||
public function deleteNote($id)
|
||||
public function destroy($id)
|
||||
{
|
||||
$note = Note::findOrFail($id);
|
||||
$note->delete();
|
||||
|
||||
return view('admin.deletenotesuccess');
|
||||
return view('admin.notes.deletesuccess');
|
||||
}
|
||||
}
|
|
@ -1,23 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Place;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\PlaceService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Phaza\LaravelPostgis\Geometries\Point;
|
||||
|
||||
class PlacesAdminController extends Controller
|
||||
class PlacesController extends Controller
|
||||
{
|
||||
protected $placeService;
|
||||
|
||||
public function __construct(PlaceService $placeService = null)
|
||||
{
|
||||
$this->placeService = $placeService ?? new PlaceService();
|
||||
}
|
||||
|
||||
/**
|
||||
* List the places that can be edited.
|
||||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function listPlacesPage()
|
||||
public function index()
|
||||
{
|
||||
$places = Place::all();
|
||||
|
||||
return view('admin.listplaces', ['places' => $places]);
|
||||
return view('admin.places.list', ['places' => $places]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,9 +34,9 @@ class PlacesAdminController extends Controller
|
|||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function newPlacePage()
|
||||
public function create()
|
||||
{
|
||||
return view('admin.newplace');
|
||||
return view('admin.places.new');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,14 +45,14 @@ class PlacesAdminController extends Controller
|
|||
* @param string The place id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function editPlacePage($placeId)
|
||||
public function edit($placeId)
|
||||
{
|
||||
$place = Place::findOrFail($placeId);
|
||||
|
||||
$latitude = $place->getLatitude();
|
||||
$longitude = $place->getLongitude();
|
||||
|
||||
return view('admin.editplace', [
|
||||
return view('admin.places.edit', [
|
||||
'id' => $placeId,
|
||||
'name' => $place->name,
|
||||
'description' => $place->description,
|
||||
|
@ -58,11 +67,16 @@ class PlacesAdminController extends Controller
|
|||
* @param Illuminate\Http\Request $request
|
||||
* @return Illuminate\View\Factory view
|
||||
*/
|
||||
public function createPlace(Request $request)
|
||||
public function store(Request $request)
|
||||
{
|
||||
$this->placeService->createPlace($request);
|
||||
$data = [];
|
||||
$data['name'] = $request->name;
|
||||
$data['description'] = $request->description;
|
||||
$data['latitude'] = $request->latitude;
|
||||
$data['longitude'] = $request->longitude;
|
||||
$place = $this->placeService->createPlace($data);
|
||||
|
||||
return view('admin.newplacesuccess');
|
||||
return view('admin.places.newsuccess');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -72,7 +86,7 @@ class PlacesAdminController extends Controller
|
|||
* @param Illuminate\Http\Request $request
|
||||
* @return Illuminate\View\Factory view
|
||||
*/
|
||||
public function editPlace($placeId, Request $request)
|
||||
public function update($placeId, Request $request)
|
||||
{
|
||||
$place = Place::findOrFail($placeId);
|
||||
$place->name = $request->name;
|
||||
|
@ -80,6 +94,6 @@ class PlacesAdminController extends Controller
|
|||
$place->location = new Point((float) $request->latitude, (float) $request->longitude);
|
||||
$place->save();
|
||||
|
||||
return view('admin.editplacesuccess');
|
||||
return view('admin.places.editsuccess');
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
class AdminController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Admin Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here we have the logic for the admin cp
|
||||
|
|
||||
*/
|
||||
|
||||
/**
|
||||
* Set variables.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->username = env('ADMIN_USER');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the main admin CP page.
|
||||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function showWelcome()
|
||||
{
|
||||
return view('admin.welcome', ['name' => $this->username]);
|
||||
}
|
||||
}
|
|
@ -12,14 +12,14 @@ class ArticlesController extends Controller
|
|||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function showAllArticles($year = null, $month = null)
|
||||
public function index($year = null, $month = null)
|
||||
{
|
||||
$articles = Article::where('published', '1')
|
||||
->date($year, $month)
|
||||
->orderBy('updated_at', 'desc')
|
||||
->simplePaginate(5);
|
||||
|
||||
return view('articles', compact('articles'));
|
||||
return view('articles.index', compact('articles'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,14 +27,14 @@ class ArticlesController extends Controller
|
|||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function singleArticle($year, $month, $slug)
|
||||
public function show($year, $month, $slug)
|
||||
{
|
||||
$article = Article::where('titleurl', $slug)->first();
|
||||
if ($article->updated_at->year != $year || $article->updated_at->month != $month) {
|
||||
throw new \Exception;
|
||||
}
|
||||
|
||||
return view('article', compact('article'));
|
||||
return view('articles.show', compact('article'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -63,7 +63,7 @@ class ArticlesController extends Controller
|
|||
$buildDate = $articles->first()->updated_at->toRssString();
|
||||
|
||||
return response()
|
||||
->view('rss', compact('articles', 'buildDate'), 200)
|
||||
->view('articles.rss', compact('articles', 'buildDate'), 200)
|
||||
->header('Content-Type', 'application/rss+xml');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,9 +15,9 @@ class AuthController extends Controller
|
|||
*/
|
||||
public function login(Request $request)
|
||||
{
|
||||
if ($request->input('username') === env('ADMIN_USER')
|
||||
if ($request->input('username') === config('admin.user')
|
||||
&&
|
||||
$request->input('password') === env('ADMIN_PASS')
|
||||
$request->input('password') === config('admin.pass')
|
||||
) {
|
||||
session(['loggedin' => true]);
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ class ContactsController extends Controller
|
|||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function showAll()
|
||||
public function index()
|
||||
{
|
||||
$filesystem = new Filesystem();
|
||||
$contacts = Contact::all();
|
||||
|
@ -25,7 +25,7 @@ class ContactsController extends Controller
|
|||
'/assets/profile-images/default-image';
|
||||
}
|
||||
|
||||
return view('contacts', compact('contacts'));
|
||||
return view('contacts.index', compact('contacts'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,17 +33,17 @@ class ContactsController extends Controller
|
|||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function showSingle($nick)
|
||||
public function show($nick)
|
||||
{
|
||||
$filesystem = new Filesystem();
|
||||
$contact = Contact::where('nick', '=', $nick)->firstOrFail();
|
||||
$contact->homepageHost = parse_url($contact->homepage, PHP_URL_HOST);
|
||||
$file = public_path() . '/assets/profile-images/' . $contact->homepageHost . '/image';
|
||||
$contact->image = ($filesystem->exists($file)) ?
|
||||
$image = ($filesystem->exists($file)) ?
|
||||
'/assets/profile-images/' . $contact->homepageHost . '/image'
|
||||
:
|
||||
'/assets/profile-images/default-image';
|
||||
|
||||
return view('contact', ['contact' => $contact]);
|
||||
return view('contacts.show', compact('contact', 'image'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,11 +2,8 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use IndieAuth\Client;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use App\Services\TokenService;
|
||||
use Illuminate\Cookie\CookieJar;
|
||||
use App\Services\IndieAuthService;
|
||||
|
||||
class IndieAuthController extends Controller
|
||||
|
@ -16,11 +13,6 @@ class IndieAuthController extends Controller
|
|||
*/
|
||||
protected $indieAuthService;
|
||||
|
||||
/**
|
||||
* The IndieAuth Client implementation.
|
||||
*/
|
||||
protected $client;
|
||||
|
||||
/**
|
||||
* The Token handling service.
|
||||
*/
|
||||
|
@ -30,16 +22,14 @@ class IndieAuthController extends Controller
|
|||
* Inject the dependencies.
|
||||
*
|
||||
* @param \App\Services\IndieAuthService $indieAuthService
|
||||
* @param \IndieAuth\Client $client
|
||||
* @param \App\Services\TokenService $tokenService
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
IndieAuthService $indieAuthService = null,
|
||||
Client $client = null,
|
||||
TokenService $tokenService = null
|
||||
) {
|
||||
$this->indieAuthService = $indieAuthService ?? new IndieAuthService();
|
||||
$this->client = $client ?? new Client();
|
||||
$this->tokenService = $tokenService ?? new TokenService();
|
||||
}
|
||||
|
||||
|
@ -52,24 +42,22 @@ class IndieAuthController extends Controller
|
|||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Routing\RedirectResponse redirect
|
||||
*/
|
||||
public function beginauth(Request $request)
|
||||
public function start(Request $request)
|
||||
{
|
||||
$authorizationEndpoint = $this->indieAuthService->getAuthorizationEndpoint(
|
||||
$request->input('me'),
|
||||
$this->client
|
||||
$request->input('me')
|
||||
);
|
||||
if ($authorizationEndpoint) {
|
||||
if ($authorizationEndpoint !== null) {
|
||||
$authorizationURL = $this->indieAuthService->buildAuthorizationURL(
|
||||
$authorizationEndpoint,
|
||||
$request->input('me'),
|
||||
$this->client
|
||||
$request->input('me')
|
||||
);
|
||||
if ($authorizationURL) {
|
||||
return redirect($authorizationURL);
|
||||
}
|
||||
}
|
||||
|
||||
return redirect('/notes/new')->withErrors('Unable to determine authorisation endpoint', 'indieauth');
|
||||
return redirect(route('micropub-client'))->with('error', 'Unable to determine authorisation endpoint');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -79,35 +67,54 @@ class IndieAuthController extends Controller
|
|||
* @param \Illuminate\Http\Rrequest $request
|
||||
* @return \Illuminate\Routing\RedirectResponse redirect
|
||||
*/
|
||||
public function indieauth(Request $request)
|
||||
public function callback(Request $request)
|
||||
{
|
||||
if ($request->session()->get('state') != $request->input('state')) {
|
||||
return redirect('/notes/new')->withErrors(
|
||||
'Invalid <code>state</code> value returned from indieauth server',
|
||||
'indieauth'
|
||||
return redirect(route('micropub-client'))->with(
|
||||
'error',
|
||||
'Invalid <code>state</code> value returned from indieauth server'
|
||||
);
|
||||
}
|
||||
$tokenEndpoint = $this->indieAuthService->getTokenEndpoint($request->input('me'));
|
||||
if ($tokenEndpoint === false) {
|
||||
return redirect(route('micropub-client'))->with(
|
||||
'error',
|
||||
'Unable to determine token endpoint'
|
||||
);
|
||||
}
|
||||
$tokenEndpoint = $this->indieAuthService->getTokenEndpoint($request->input('me'), $this->client);
|
||||
$redirectURL = config('app.url') . '/indieauth';
|
||||
$clientId = config('app.url') . '/notes/new';
|
||||
$data = [
|
||||
'endpoint' => $tokenEndpoint,
|
||||
'code' => $request->input('code'),
|
||||
'me' => $request->input('me'),
|
||||
'redirect_url' => $redirectURL,
|
||||
'client_id' => $clientId,
|
||||
'redirect_url' => route('indieauth-callback'),
|
||||
'client_id' => route('micropub-client'),
|
||||
'state' => $request->input('state'),
|
||||
];
|
||||
$token = $this->indieAuthService->getAccessToken($data, $this->client);
|
||||
$token = $this->indieAuthService->getAccessToken($data);
|
||||
|
||||
if (array_key_exists('access_token', $token)) {
|
||||
$request->session()->put('me', $token['me']);
|
||||
$request->session()->put('token', $token['access_token']);
|
||||
|
||||
return redirect('/notes/new');
|
||||
return redirect(route('micropub-client'));
|
||||
}
|
||||
|
||||
return redirect('/notes/new')->withErrors('Unable to get a token from the endpoint', 'indieauth');
|
||||
return redirect(route('micropub-client'))->with(
|
||||
'error',
|
||||
'Unable to get a token from the endpoint'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log out the user, flush an session data, and overwrite any cookie data.
|
||||
*
|
||||
* @return \Illuminate\Routing\RedirectResponse redirect
|
||||
*/
|
||||
public function logout(Request $request)
|
||||
{
|
||||
$request->session()->flush();
|
||||
|
||||
return redirect(route('micropub-client'))->cookie('me', 'loggedout', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -125,7 +132,7 @@ class IndieAuthController extends Controller
|
|||
'client_id' => $request->input('client_id'),
|
||||
'state' => $request->input('state'),
|
||||
];
|
||||
$auth = $this->indieAuthService->verifyIndieAuthCode($authData, $this->client);
|
||||
$auth = $this->indieAuthService->verifyIndieAuthCode($authData);
|
||||
if (array_key_exists('me', $auth)) {
|
||||
$scope = $auth['scope'] ?? '';
|
||||
$tokenData = [
|
||||
|
@ -140,25 +147,11 @@ class IndieAuthController extends Controller
|
|||
'access_token' => $token,
|
||||
]);
|
||||
|
||||
return (new Response($content, 200))
|
||||
->header('Content-Type', 'application/x-www-form-urlencoded');
|
||||
return response($content)
|
||||
->header('Content-Type', 'application/x-www-form-urlencoded');
|
||||
}
|
||||
$content = 'There was an error verifying the authorisation code.';
|
||||
|
||||
return new Response($content, 400);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log out the user, flush an session data, and overwrite any cookie data.
|
||||
*
|
||||
* @param \Illuminate\Cookie\CookieJar $cookie
|
||||
* @return \Illuminate\Routing\RedirectResponse redirect
|
||||
*/
|
||||
public function indieauthLogout(Request $request, CookieJar $cookie)
|
||||
{
|
||||
$request->session()->flush();
|
||||
$cookie->queue('me', 'loggedout', 5);
|
||||
|
||||
return redirect('/notes/new');
|
||||
return response($content, 400);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,15 +36,12 @@ class MicropubClientController extends Controller
|
|||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function newNotePage(Request $request)
|
||||
public function create(Request $request)
|
||||
{
|
||||
$url = $request->session()->get('me');
|
||||
$syndication = $request->session()->get('syndication');
|
||||
|
||||
return view('micropubnewnotepage', [
|
||||
'url' => $url,
|
||||
'syndication' => $syndication,
|
||||
]);
|
||||
return view('micropub.create', compact('url', 'syndication'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,7 +52,7 @@ class MicropubClientController extends Controller
|
|||
* @param \Illuminate\Http\Request $request
|
||||
* @return mixed
|
||||
*/
|
||||
public function postNewNote(Request $request)
|
||||
public function store(Request $request)
|
||||
{
|
||||
$domain = $request->session()->get('me');
|
||||
$token = $request->session()->get('token');
|
||||
|
@ -65,7 +62,7 @@ class MicropubClientController extends Controller
|
|||
$this->indieClient
|
||||
);
|
||||
if (! $micropubEndpoint) {
|
||||
return redirect('notes/new')->withErrors('Unable to determine micropub API endpoint', 'endpoint');
|
||||
return redirect(route('micropub-client'))->with('error', 'Unable to determine micropub API endpoint');
|
||||
}
|
||||
|
||||
$response = $this->postNoteRequest($request, $micropubEndpoint, $token);
|
||||
|
@ -79,7 +76,7 @@ class MicropubClientController extends Controller
|
|||
return redirect($location);
|
||||
}
|
||||
|
||||
return redirect('notes/new')->withErrors('Endpoint didn’t create the note.', 'endpoint');
|
||||
return redirect(route('micropub-client'))->with('error', 'Endpoint didn’t create the note.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -90,8 +87,6 @@ class MicropubClientController extends Controller
|
|||
* and syndicate-to
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \IndieAuth\Client $indieClient
|
||||
* @param \GuzzleHttp\Client $guzzleClient
|
||||
* @return \Illuminate\Routing\Redirector redirect
|
||||
*/
|
||||
public function refreshSyndicationTargets(Request $request)
|
||||
|
@ -99,9 +94,8 @@ class MicropubClientController extends Controller
|
|||
$domain = $request->session()->get('me');
|
||||
$token = $request->session()->get('token');
|
||||
$micropubEndpoint = $this->indieAuthService->discoverMicropubEndpoint($domain, $this->indieClient);
|
||||
|
||||
if (! $micropubEndpoint) {
|
||||
return redirect('notes/new')->withErrors('Unable to determine micropub API endpoint', 'endpoint');
|
||||
return redirect(route('micropub-client'))->with('error', 'Unable to determine micropub API endpoint');
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -110,14 +104,17 @@ class MicropubClientController extends Controller
|
|||
'query' => ['q' => 'syndicate-to'],
|
||||
]);
|
||||
} catch (\GuzzleHttp\Exception\BadResponseException $e) {
|
||||
return redirect('notes/new')->withErrors('Bad response when refreshing syndication targets', 'endpoint');
|
||||
return redirect(route('micropub-client'))->with(
|
||||
'error',
|
||||
'Bad response when refreshing syndication targets'
|
||||
);
|
||||
}
|
||||
$body = (string) $response->getBody();
|
||||
$syndication = $this->parseSyndicationTargets($body);
|
||||
|
||||
$request->session()->put('syndication', $syndication);
|
||||
|
||||
return redirect('notes/new');
|
||||
return redirect(route('micropub-client'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -184,8 +181,10 @@ class MicropubClientController extends Controller
|
|||
'headers' => $headers,
|
||||
]);
|
||||
} catch (\GuzzleHttp\Exception\BadResponseException $e) {
|
||||
return redirect('notes/new')
|
||||
->withErrors('There was a bad response from the micropub endpoint.', 'endpoint');
|
||||
return redirect(route('micropub-client'))->with(
|
||||
'error',
|
||||
'There was a bad response from the micropub endpoint.'
|
||||
);
|
||||
}
|
||||
|
||||
return $response;
|
||||
|
@ -197,7 +196,7 @@ class MicropubClientController extends Controller
|
|||
* @param \Illuminate\Http\Request $request
|
||||
* @return mixed
|
||||
*/
|
||||
public function postNewPlace(Request $request)
|
||||
public function newPlace(Request $request)
|
||||
{
|
||||
if ($request->session()->has('token') === false) {
|
||||
return response()->json([
|
||||
|
@ -274,15 +273,10 @@ class MicropubClientController extends Controller
|
|||
* Make a request to the micropub endpoint requesting any nearby places.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param string $latitude
|
||||
* @param string $longitude
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function nearbyPlaces(
|
||||
Request $request,
|
||||
$latitude,
|
||||
$longitude
|
||||
) {
|
||||
public function nearbyPlaces(Request $request)
|
||||
{
|
||||
if ($request->session()->has('token') === false) {
|
||||
return response()->json([
|
||||
'error' => true,
|
||||
|
@ -302,7 +296,7 @@ class MicropubClientController extends Controller
|
|||
}
|
||||
|
||||
try {
|
||||
$query = 'geo:' . $latitude . ',' . $longitude;
|
||||
$query = 'geo:' . $request->input('latitude') . ',' . $request->input('longitude');
|
||||
if ($request->input('u') !== null) {
|
||||
$query .= ';u=' . $request->input('u');
|
||||
}
|
||||
|
@ -319,7 +313,7 @@ class MicropubClientController extends Controller
|
|||
], 400);
|
||||
}
|
||||
|
||||
return (new Response($response->getBody(), 200))
|
||||
return response($response->getBody(), 200)
|
||||
->header('Content-Type', 'application/json');
|
||||
}
|
||||
|
||||
|
@ -344,6 +338,8 @@ class MicropubClientController extends Controller
|
|||
'name' => $syn['name'],
|
||||
];
|
||||
}
|
||||
} else {
|
||||
$syndicateTo[] = ['target' => 'http://example.org', 'name' => 'Joe Bloggs on Example'];
|
||||
}
|
||||
if (count($syndicateTo) > 0) {
|
||||
return $syndicateTo;
|
||||
|
|
|
@ -57,8 +57,46 @@ class MicropubController extends Controller
|
|||
if (array_search('post', $scopes) !== false) {
|
||||
$clientId = $tokenData->getClaim('client_id');
|
||||
if (($request->input('h') == 'entry') || ($request->input('type')[0] == 'h-entry')) {
|
||||
$data = [];
|
||||
$data['client-id'] = $clientId;
|
||||
if ($request->header('Content-Type') == 'application/json') {
|
||||
$data['content'] = $request->input('properties.content')[0];
|
||||
$data['in-reply-to'] = $request->input('properties.in-reply-to')[0];
|
||||
$data['location'] = $request->input('properties.location');
|
||||
//flatten location if array
|
||||
if (is_array($data['location'])) {
|
||||
$data['location'] = $data['location'][0];
|
||||
}
|
||||
} else {
|
||||
$data['content'] = $request->input('content');
|
||||
$data['in-reply-to'] = $request->input('in-reply-to');
|
||||
$data['location'] = $request->input('location');
|
||||
}
|
||||
$data['syndicate'] = [];
|
||||
$targets = array_pluck(config('syndication.targets'), 'uid', 'service.name');
|
||||
if (is_string($request->input('mp-syndicate-to'))) {
|
||||
$service = array_search($request->input('mp-syndicate-to'));
|
||||
if ($service == 'Twitter') {
|
||||
$data['syndicate'][] = 'twitter';
|
||||
}
|
||||
if ($service == 'Facebook') {
|
||||
$data['syndicate'][] = 'facebook';
|
||||
}
|
||||
}
|
||||
if (is_array($request->input('mp-syndicate-to'))) {
|
||||
foreach ($targets as $service => $target) {
|
||||
if (in_array($target, $request->input('mp-syndicate-to'))) {
|
||||
if ($service == 'Twitter') {
|
||||
$data['syndicate'][] = 'twitter';
|
||||
}
|
||||
if ($service == 'Facebook') {
|
||||
$data['syndicate'][] = 'facebook';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
$note = $this->noteService->createNote($request, $clientId);
|
||||
$note = $this->noteService->createNote($data);
|
||||
} catch (Exception $exception) {
|
||||
return response()->json(['error' => true], 400);
|
||||
}
|
||||
|
@ -69,8 +107,26 @@ class MicropubController extends Controller
|
|||
], 201)->header('Location', $note->longurl);
|
||||
}
|
||||
if ($request->input('h') == 'card' || $request->input('type')[0] == 'h-card') {
|
||||
$data = [];
|
||||
if ($request->header('Content-Type') == 'application/json') {
|
||||
$data['name'] = $request->input('properties.name');
|
||||
$data['description'] = $request->input('properties.description') ?? null;
|
||||
if ($request->has('properties.geo')) {
|
||||
$data['geo'] = $request->input('properties.geo');
|
||||
}
|
||||
} else {
|
||||
$data['name'] = $request->input('name');
|
||||
$data['description'] = $request->input('description');
|
||||
if ($request->has('geo')) {
|
||||
$data['geo'] = $request->input('geo');
|
||||
}
|
||||
if ($request->has('latitude')) {
|
||||
$data['latitude'] = $request->input('latitude');
|
||||
$data['longitude'] = $request->input('longitude');
|
||||
}
|
||||
}
|
||||
try {
|
||||
$place = $this->placeService->createPlace($request);
|
||||
$place = $this->placeService->createPlace($data);
|
||||
} catch (Exception $exception) {
|
||||
return response()->json(['error' => true], 400);
|
||||
}
|
||||
|
@ -106,7 +162,7 @@ class MicropubController extends Controller
|
|||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function getEndpoint(Request $request)
|
||||
public function get(Request $request)
|
||||
{
|
||||
$httpAuth = $request->header('Authorization');
|
||||
if (preg_match('/Bearer (.+)/', $httpAuth, $match)) {
|
||||
|
@ -162,16 +218,11 @@ class MicropubController extends Controller
|
|||
],
|
||||
]);
|
||||
}
|
||||
$content = 'No OAuth token sent with request.';
|
||||
$content = <<<'EOD'
|
||||
{
|
||||
"response": "error",
|
||||
"error": "no_token",
|
||||
"error_description": "No token provided with request"
|
||||
}
|
||||
EOD;
|
||||
|
||||
return (new Response($content, 400))
|
||||
->header('Content-Type', 'application/json');
|
||||
return response()->json([
|
||||
'response' => 'error',
|
||||
'error' => 'no_token',
|
||||
'error_description' => 'No token provided with request',
|
||||
], 400);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ class NotesController extends Controller
|
|||
* @param Illuminate\Http\Request request;
|
||||
* @return \Illuminte\View\Factory view
|
||||
*/
|
||||
public function showNotes(Request $request)
|
||||
public function index(Request $request)
|
||||
{
|
||||
$notes = Note::orderBy('id', 'desc')->with('webmentions', 'place', 'media')->paginate(10);
|
||||
foreach ($notes as $note) {
|
||||
|
@ -51,7 +51,12 @@ class NotesController extends Controller
|
|||
$note->longitude = $lnglat[0];
|
||||
$note->address = $note->place->name;
|
||||
$note->placeLink = '/places/' . $note->place->slug;
|
||||
$note->geoJson = $this->getGeoJson($note->longitude, $note->latitude, $note->place->name, $note->place->icon);
|
||||
$note->geoJson = $this->getGeoJson(
|
||||
$note->longitude,
|
||||
$note->latitude,
|
||||
$note->place->name,
|
||||
$note->place->icon
|
||||
);
|
||||
}
|
||||
$photoURLs = [];
|
||||
$photos = $note->getMedia();
|
||||
|
@ -63,7 +68,7 @@ class NotesController extends Controller
|
|||
|
||||
$homepage = ($request->path() == '/');
|
||||
|
||||
return view('notes', compact('notes', 'homepage'));
|
||||
return view('notes.index', compact('notes', 'homepage'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -72,7 +77,7 @@ class NotesController extends Controller
|
|||
* @param string The id of the note
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function singleNote($urlId)
|
||||
public function show($urlId)
|
||||
{
|
||||
$numbers = new Numbers();
|
||||
$authorship = new Authorship();
|
||||
|
@ -151,7 +156,12 @@ class NotesController extends Controller
|
|||
$note->longitude = $lnglat[0];
|
||||
$note->address = $note->place->name;
|
||||
$note->placeLink = '/places/' . $note->place->slug;
|
||||
$note->geoJson = $this->getGeoJson($note->longitude, $note->latitude, $note->place->name, $note->place->icon);
|
||||
$note->geoJson = $this->getGeoJson(
|
||||
$note->longitude,
|
||||
$note->latitude,
|
||||
$note->place->name,
|
||||
$note->place->icon
|
||||
);
|
||||
}
|
||||
|
||||
$photoURLs = [];
|
||||
|
@ -161,7 +171,7 @@ class NotesController extends Controller
|
|||
}
|
||||
$note->photoURLs = $photoURLs;
|
||||
|
||||
return view('note', compact('note', 'replies', 'reposts', 'likes'));
|
||||
return view('notes.show', compact('note', 'replies', 'reposts', 'likes'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -170,7 +180,7 @@ class NotesController extends Controller
|
|||
* @param string The decimal id of he note
|
||||
* @return \Illuminate\Routing\RedirectResponse redirect
|
||||
*/
|
||||
public function singleNoteRedirect($decId)
|
||||
public function redirect($decId)
|
||||
{
|
||||
$numbers = new Numbers();
|
||||
$realId = $numbers->numto60($decId);
|
||||
|
@ -186,7 +196,7 @@ class NotesController extends Controller
|
|||
* @param string The tag
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function taggedNotes($tag)
|
||||
public function tagged($tag)
|
||||
{
|
||||
$notes = Note::whereHas('tags', function ($query) use ($tag) {
|
||||
$query->where('tag', $tag);
|
||||
|
@ -196,7 +206,7 @@ class NotesController extends Controller
|
|||
$note->human_time = $note->updated_at->diffForHumans();
|
||||
}
|
||||
|
||||
return view('taggednotes', compact('notes', 'tag'));
|
||||
return view('notes.tagged', compact('notes', 'tag'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Place;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PlacesController extends Controller
|
||||
{
|
||||
|
@ -19,27 +18,6 @@ class PlacesController extends Controller
|
|||
return view('allplaces', ['places' => $places]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
|
@ -48,42 +26,8 @@ class PlacesController extends Controller
|
|||
*/
|
||||
public function show($slug)
|
||||
{
|
||||
$place = Place::where('slug', '=', $slug)->first();
|
||||
$place = Place::where('slug', '=', $slug)->firstOrFail();
|
||||
|
||||
return view('singleplace', ['place' => $place]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Services\TokenService;
|
||||
|
||||
class TokensController extends Controller
|
||||
{
|
||||
/**
|
||||
* The token service container.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $tokenService;
|
||||
|
||||
/**
|
||||
* Inject the service dependency.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(TokenService $tokenService = null)
|
||||
{
|
||||
$this->tokenService = $tokenService ?? new TokenService();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the saved tokens.
|
||||
*
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function showTokens()
|
||||
{
|
||||
$tokens = $$his->tokenService->getAll();
|
||||
|
||||
return view('admin.listtokens', ['tokens' => $tokens]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form to delete a certain token.
|
||||
*
|
||||
* @param string The token id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function deleteToken($tokenId)
|
||||
{
|
||||
return view('admin.deletetoken', ['id' => $tokenId]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the request to delete a token.
|
||||
*
|
||||
* @param string The token id
|
||||
* @return \Illuminate\View\Factory view
|
||||
*/
|
||||
public function postDeleteToken($tokenId)
|
||||
{
|
||||
$this->tokenService->deleteToken($tokenId);
|
||||
|
||||
return view('admin.deletetokensuccess', ['id' => $tokenId]);
|
||||
}
|
||||
}
|
|
@ -17,9 +17,17 @@ class DevTokenMiddleware
|
|||
public function handle($request, Closure $next)
|
||||
{
|
||||
if (config('app.env') !== 'production') {
|
||||
session(['me' => env('APP_URL')]);
|
||||
session(['me' => config('app.url')]);
|
||||
if (Storage::exists('dev-token')) {
|
||||
session(['token' => Storage::get('dev-token')]);
|
||||
} else {
|
||||
$data = [
|
||||
'me' => config('app.url'),
|
||||
'client_id' => route('micropub-client'),
|
||||
'scope' => 'post',
|
||||
];
|
||||
$tokenService = new \App\Services\TokenService();
|
||||
session(['token' => $tokenService->getNewToken($data)]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ class SendWebMentions implements ShouldQueue
|
|||
public function discoverWebmentionEndpoint($url, $guzzle)
|
||||
{
|
||||
//let’s not send webmentions to myself
|
||||
if (parse_url($url, PHP_URL_HOST) == env('LONG_URL', 'localhost')) {
|
||||
if (parse_url($url, PHP_URL_HOST) == config('app.longurl')) {
|
||||
return false;
|
||||
}
|
||||
if (starts_with($url, '/notes/tagged/')) {
|
||||
|
|
|
@ -5,6 +5,7 @@ namespace App\Providers;
|
|||
use App\Tag;
|
||||
use App\Note;
|
||||
use Validator;
|
||||
use Laravel\Dusk\DuskServiceProvider;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
|
@ -54,6 +55,8 @@ class AppServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
if ($this->app->environment('local', 'testing')) {
|
||||
$this->app->register(DuskServiceProvider::class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,20 +1,35 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use IndieAuth\Client;
|
||||
|
||||
class IndieAuthService
|
||||
{
|
||||
protected $client;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->client = new Client();
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a domain, determing the assocaited authorization endpoint,
|
||||
* if one exists.
|
||||
*
|
||||
* @param string The domain
|
||||
* @param \IndieAuth\Client $client
|
||||
* @return string|null
|
||||
*/
|
||||
public function getAuthorizationEndpoint($domain, $client)
|
||||
public function getAuthorizationEndpoint(string $domain): ?string
|
||||
{
|
||||
return $client->discoverAuthorizationEndpoint($client->normalizeMeURL($domain));
|
||||
$endpoint = $this->client->discoverAuthorizationEndpoint($this->client->normalizeMeURL($domain));
|
||||
if ($endpoint === false) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $endpoint;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -22,20 +37,18 @@ class IndieAuthService
|
|||
*
|
||||
* @param string $authEndpoint
|
||||
* @param string $domain
|
||||
* @param \IndieAuth\Client $client
|
||||
* @return string
|
||||
*/
|
||||
public function buildAuthorizationURL($authEndpoint, $domain, $client)
|
||||
public function buildAuthorizationURL(string $authEndpoint, string $domain): string
|
||||
{
|
||||
$domain = $client->normalizeMeURL($domain);
|
||||
$state = bin2hex(openssl_random_pseudo_bytes(16));
|
||||
session(['state' => $state]);
|
||||
$redirectURL = config('app.url') . '/indieauth';
|
||||
$clientId = config('app.url') . '/notes/new';
|
||||
$redirectURL = route('indieauth-callback');
|
||||
$clientId = route('micropub-client');
|
||||
$scope = 'post';
|
||||
$authorizationURL = $client->buildAuthorizationURL(
|
||||
$authorizationURL = $this->client->buildAuthorizationURL(
|
||||
$authEndpoint,
|
||||
$domain,
|
||||
$this->client->normalizeMeURL($domain),
|
||||
$redirectURL,
|
||||
$clientId,
|
||||
$state,
|
||||
|
@ -49,24 +62,22 @@ class IndieAuthService
|
|||
* Discover the token endpoint for a given domain.
|
||||
*
|
||||
* @param string The domain
|
||||
* @param \IndieAuth\Client $client
|
||||
* @return string|null
|
||||
*/
|
||||
public function getTokenEndpoint($domain, $client)
|
||||
public function getTokenEndpoint(string $domain): ?string
|
||||
{
|
||||
return $client->discoverTokenEndpoint($domain);
|
||||
return $this->client->discoverTokenEndpoint($this->client->normalizeMeURL($domain));
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a token from the token endpoint.
|
||||
*
|
||||
* @param array The relavent data
|
||||
* @param \IndieAuth\Client $client
|
||||
* @return array
|
||||
*/
|
||||
public function getAccessToken(array $data, $client)
|
||||
public function getAccessToken(array $data): array
|
||||
{
|
||||
return $client->getAccessToken(
|
||||
return $this->client->getAccessToken(
|
||||
$data['endpoint'],
|
||||
$data['code'],
|
||||
$data['me'],
|
||||
|
@ -81,14 +92,13 @@ class IndieAuthService
|
|||
* valid.
|
||||
*
|
||||
* @param array The data.
|
||||
* @param \IndieAuth\Client $client
|
||||
* @return array|null
|
||||
*/
|
||||
public function verifyIndieAuthCode(array $data, $client)
|
||||
public function verifyIndieAuthCode(array $data): ?array
|
||||
{
|
||||
$authEndpoint = $client->discoverAuthorizationEndpoint($data['me']);
|
||||
$authEndpoint = $this->client->discoverAuthorizationEndpoint($data['me']);
|
||||
if ($authEndpoint) {
|
||||
return $client->verifyIndieAuthCode(
|
||||
return $this->client->verifyIndieAuthCode(
|
||||
$authEndpoint,
|
||||
$data['code'],
|
||||
$data['me'],
|
||||
|
@ -103,11 +113,10 @@ class IndieAuthService
|
|||
* Determine the micropub endpoint.
|
||||
*
|
||||
* @param string $domain
|
||||
* @param \IndieAuth\Client $client
|
||||
* @return string The endpoint
|
||||
* @return string|null The endpoint
|
||||
*/
|
||||
public function discoverMicropubEndpoint($domain, $client)
|
||||
public function discoverMicropubEndpoint(string $domain): ?string
|
||||
{
|
||||
return $client->discoverMicropubEndpoint($client->normalizeMeURL($domain));
|
||||
return $this->client->discoverMicropubEndpoint($this->client->normalizeMeURL($domain));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Note;
|
||||
use App\Place;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Jobs\SendWebMentions;
|
||||
use App\Jobs\SyndicateToTwitter;
|
||||
use App\Jobs\SyndicateToFacebook;
|
||||
|
@ -14,53 +15,38 @@ class NoteService
|
|||
/**
|
||||
* Create a new note.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param string $clientId
|
||||
* @param array $data
|
||||
* @return \App\Note $note
|
||||
*/
|
||||
public function createNote(Request $request, $clientId = null)
|
||||
public function createNote(array $data): Note
|
||||
{
|
||||
if ($request->header('Content-Type') == 'application/json') {
|
||||
$content = $request->input('properties.content')[0];
|
||||
$inReplyTo = $request->input('properties.in-reply-to')[0];
|
||||
$location = $request->input('properties.location');
|
||||
if (is_array($location)) {
|
||||
$location = $location[0];
|
||||
}
|
||||
} else {
|
||||
$content = $request->input('content');
|
||||
$inReplyTo = $request->input('in-reply-to');
|
||||
$location = $request->input('location');
|
||||
}
|
||||
|
||||
$note = Note::create(
|
||||
[
|
||||
'note' => $content,
|
||||
'in_reply_to' => $inReplyTo,
|
||||
'client_id' => $clientId,
|
||||
'note' => $data['content'],
|
||||
'in_reply_to' => $data['in-reply-to'],
|
||||
'client_id' => $data['client-id'],
|
||||
]
|
||||
);
|
||||
|
||||
if ($location !== null && $location !== 'no-location') {
|
||||
if (substr($location, 0, strlen(config('app.url'))) == config('app.url')) {
|
||||
if (array_key_exists('location', $data) && $data['location'] !== null && $data['location'] !== 'no-location') {
|
||||
if (substr($data['location'], 0, strlen(config('app.url'))) == config('app.url')) {
|
||||
//uri of form http://host/places/slug, we want slug so chop off start
|
||||
//that’s the app’s url plus `/places/`
|
||||
$slug = mb_substr($location, mb_strlen(config('app.url')) + 8);
|
||||
$place = Place::where('slug', '=', $slug)->first();
|
||||
$note->place()->associate($place);
|
||||
$note->save();
|
||||
}
|
||||
if (substr($location, 0, 4) == 'geo:') {
|
||||
if (substr($data['location'], 0, 4) == 'geo:') {
|
||||
preg_match_all(
|
||||
'/([0-9\.\-]+)/',
|
||||
$location,
|
||||
$data['location'],
|
||||
$matches
|
||||
);
|
||||
$note->location = $matches[0][0] . ', ' . $matches[0][1];
|
||||
$note->save();
|
||||
}
|
||||
}
|
||||
|
||||
/* drop image support for now
|
||||
//add images to media library
|
||||
if ($request->hasFile('photo')) {
|
||||
$files = $request->file('photo');
|
||||
|
@ -68,40 +54,19 @@ class NoteService
|
|||
$note->addMedia($file)->toCollectionOnDisk('images', 's3');
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
$note->save();
|
||||
|
||||
dispatch(new SendWebMentions($note));
|
||||
|
||||
//syndication targets
|
||||
//from admin CP
|
||||
if ($request->input('twitter')) {
|
||||
if (in_array('twitter', $data['syndicate'])) {
|
||||
dispatch(new SyndicateToTwitter($note));
|
||||
}
|
||||
if ($request->input('facebook')) {
|
||||
if (in_array('facebook', $data['syndicate'])) {
|
||||
dispatch(new SyndicateToFacebook($note));
|
||||
}
|
||||
//from a micropub request
|
||||
$targets = array_pluck(config('syndication.targets'), 'uid', 'service.name');
|
||||
if (is_string($request->input('mp-syndicate-to'))) {
|
||||
$service = array_search($request->input('mp-syndicate-to'));
|
||||
if ($service == 'Twitter') {
|
||||
dispatch(new SyndicateToTwitter($note));
|
||||
}
|
||||
if ($service == 'Facebook') {
|
||||
dispatch(new SyndicateToFacebook($note));
|
||||
}
|
||||
}
|
||||
if (is_array($request->input('mp-syndicate-to'))) {
|
||||
foreach ($targets as $service => $target) {
|
||||
if (in_array($target, $request->input('mp-syndicate-to'))) {
|
||||
if ($service == 'Twitter') {
|
||||
dispatch(new SyndicateToTwitter($note));
|
||||
}
|
||||
if ($service == 'Facebook') {
|
||||
dispatch(new SyndicateToFacebook($note));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $note;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Place;
|
||||
use Illuminate\Http\Request;
|
||||
use Phaza\LaravelPostgis\Geometries\Point;
|
||||
|
||||
class PlaceService
|
||||
|
@ -11,37 +12,26 @@ class PlaceService
|
|||
/**
|
||||
* Create a place.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param array $data
|
||||
* @return \App\Place
|
||||
*/
|
||||
public function createPlace(Request $request)
|
||||
public function createPlace(array $data): Place
|
||||
{
|
||||
if ($request->header('Content-Type') == 'application/json') {
|
||||
$name = $request->input('properties.name');
|
||||
$description = $request->input('properties.description') ?? null;
|
||||
$geo = $request->input('properties.geo');
|
||||
} else {
|
||||
$name = $request->input('name');
|
||||
$description = $request->input('description');
|
||||
$geo = $request->input('geo');
|
||||
}
|
||||
if ($geo) {
|
||||
//obviously a place needs a lat/lng, but this could be sent in a geo-url
|
||||
//if no geo array key, we assume the array already has lat/lng values
|
||||
if (array_key_exists('geo', $data)) {
|
||||
preg_match_all(
|
||||
'/([0-9\.\-]+)/',
|
||||
$geo,
|
||||
$data['geo'],
|
||||
$matches
|
||||
);
|
||||
$latitude = $matches[0][0];
|
||||
$longitude = $matches[0][1];
|
||||
}
|
||||
if ($request->input('latitude') !== null) {
|
||||
$latitude = $request->input('latitude');
|
||||
$longitude = $request->input('longitude');
|
||||
$data['latitude'] = $matches[0][0];
|
||||
$data['longitude'] = $matches[0][1];
|
||||
}
|
||||
$place = new Place();
|
||||
$place->name = $name;
|
||||
$place->description = $description;
|
||||
$place->location = new Point((float) $latitude, (float) $longitude);
|
||||
$place->name = $data['name'];
|
||||
$place->description = $data['description'];
|
||||
$place->location = new Point((float) $data['latitude'], (float) $data['longitude']);
|
||||
$place->save();
|
||||
|
||||
return $place;
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use RuntimeException;
|
||||
use Lcobucci\JWT\Token;
|
||||
use Lcobucci\JWT\Parser;
|
||||
use Lcobucci\JWT\Builder;
|
||||
use InvalidArgumentException;
|
||||
|
@ -24,10 +27,10 @@ class TokenService
|
|||
->set('scope', $data['scope'])
|
||||
->set('date_issued', time())
|
||||
->set('nonce', bin2hex(random_bytes(8)))
|
||||
->sign($signer, env('APP_KEY'))
|
||||
->sign($signer, config('app.key'))
|
||||
->getToken();
|
||||
|
||||
return $token;
|
||||
return (string) $token;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,17 +39,15 @@ class TokenService
|
|||
* @param string The token
|
||||
* @return mixed
|
||||
*/
|
||||
public function validateToken($token)
|
||||
public function validateToken(string $token): ?Token
|
||||
{
|
||||
$signer = new Sha256();
|
||||
try {
|
||||
$token = (new Parser())->parse((string) $token);
|
||||
} catch (InvalidArgumentException $e) {
|
||||
return;
|
||||
} catch (RuntimeException $e) {
|
||||
return;
|
||||
} catch (InvalidArgumentException | RuntimeException $e) {
|
||||
return null;
|
||||
}
|
||||
if ($token->verify($signer, env('APP_KEY'))) {
|
||||
if ($token->verify($signer, config('app.key'))) {
|
||||
//signuture valid
|
||||
return $token;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
# Changelog
|
||||
|
||||
## Version 0.3 (2017-03-02)
|
||||
- convert env() calls to config() calls for cacheing
|
||||
- refactor routes and give important one names
|
||||
- Add Dusk tests
|
||||
- Add a deploy script
|
||||
- Add a .editorconfig file
|
||||
- Bump to PHP 7.1 to start using nullable return types and strict types
|
||||
|
||||
## Version 0.2.5 (2017-02-15)
|
||||
- Small fix for homepage bio, removed confusing un-needed view that caused fix to be necessary
|
||||
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
"license": "CC0-1.0",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"ext-intl": "*",
|
||||
"php": ">=7.0.0",
|
||||
"php": ">=7.1.0",
|
||||
"laravel/framework": "5.4.*",
|
||||
"jonnybarnes/indieweb": "dev-master",
|
||||
"jonnybarnes/webmentions-parser": "0.4.*",
|
||||
|
@ -25,18 +24,16 @@
|
|||
"sensiolabs/security-checker": "^4.0",
|
||||
"laravel/scout": "^3.0",
|
||||
"pmatseykanets/laravel-scout-postgres": "^0.5.0",
|
||||
"jonnybarnes/emoji-a11y": "^0.1.1",
|
||||
"jonnybarnes/emoji-a11y": "^0.2",
|
||||
"laravel/tinker": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"fzaninotto/faker": "~1.4",
|
||||
"mockery/mockery": "0.9.*",
|
||||
"phpunit/phpunit": "~5.7",
|
||||
"symfony/css-selector": "3.1.*",
|
||||
"symfony/dom-crawler": "3.1.*",
|
||||
"barryvdh/laravel-debugbar": "~2.0",
|
||||
"fzaninotto/faker": "~1.4",
|
||||
"jakub-onderka/php-parallel-lint": "^0.9.2",
|
||||
"laravel/browser-kit-testing": "^1.0"
|
||||
"laravel/dusk": "^1.0",
|
||||
"mockery/mockery": "0.9.*",
|
||||
"phpunit/phpunit": "~5.7"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
|
@ -47,10 +44,9 @@
|
|||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"classmap": [
|
||||
"tests/TestCase.php",
|
||||
"tests/BrowserKitTest.php"
|
||||
]
|
||||
"psr-4": {
|
||||
"Tests\\": "tests"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"post-root-package-install": [
|
||||
|
|
454
composer.lock
generated
454
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "16af842252275cac279c7f118ad6e6d4",
|
||||
"content-hash": "f3b7bcd2d79e776a84c1387f2086a5cc",
|
||||
"packages": [
|
||||
{
|
||||
"name": "anahkiasen/underscore-php",
|
||||
|
@ -58,22 +58,22 @@
|
|||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.22.4",
|
||||
"version": "3.18.23",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "916f708c1a643f86f74eacd3c5be787b40d814f8"
|
||||
"reference": "a2791b6f14b7aa6eeb4fb9f3f779cc291ab455db"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/916f708c1a643f86f74eacd3c5be787b40d814f8",
|
||||
"reference": "916f708c1a643f86f74eacd3c5be787b40d814f8",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/a2791b6f14b7aa6eeb4fb9f3f779cc291ab455db",
|
||||
"reference": "a2791b6f14b7aa6eeb4fb9f3f779cc291ab455db",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"guzzlehttp/guzzle": "^5.3.1|^6.2.1",
|
||||
"guzzlehttp/guzzle": "~5.3|~6.0.1|~6.1",
|
||||
"guzzlehttp/promises": "~1.0",
|
||||
"guzzlehttp/psr7": "~1.3.1",
|
||||
"guzzlehttp/psr7": "~1.0",
|
||||
"mtdowling/jmespath.php": "~2.2",
|
||||
"php": ">=5.5"
|
||||
},
|
||||
|
@ -134,7 +134,7 @@
|
|||
"s3",
|
||||
"sdk"
|
||||
],
|
||||
"time": "2017-02-14T21:23:54+00:00"
|
||||
"time": "2016-06-30T19:49:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "barnabywalters/mf-cleaner",
|
||||
|
@ -265,16 +265,16 @@
|
|||
},
|
||||
{
|
||||
"name": "doctrine/annotations",
|
||||
"version": "v1.3.1",
|
||||
"version": "v1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/annotations.git",
|
||||
"reference": "bd4461328621bde0ae6b1b2675fbc6aca4ceb558"
|
||||
"reference": "54cacc9b81758b14e3ce750f205a393d52339e97"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/annotations/zipball/bd4461328621bde0ae6b1b2675fbc6aca4ceb558",
|
||||
"reference": "bd4461328621bde0ae6b1b2675fbc6aca4ceb558",
|
||||
"url": "https://api.github.com/repos/doctrine/annotations/zipball/54cacc9b81758b14e3ce750f205a393d52339e97",
|
||||
"reference": "54cacc9b81758b14e3ce750f205a393d52339e97",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -283,7 +283,7 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"doctrine/cache": "1.*",
|
||||
"phpunit/phpunit": "^5.6.1"
|
||||
"phpunit/phpunit": "^5.7"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
@ -329,7 +329,7 @@
|
|||
"docblock",
|
||||
"parser"
|
||||
],
|
||||
"time": "2016-12-30T15:59:45+00:00"
|
||||
"time": "2017-02-24T16:22:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/cache",
|
||||
|
@ -917,21 +917,21 @@
|
|||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "6.2.2",
|
||||
"version": "6.2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60"
|
||||
"reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/ebf29dee597f02f09f4d5bbecc68230ea9b08f60",
|
||||
"reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/8d6c6cc55186db87b7dc5009827429ba4e9dc006",
|
||||
"reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"guzzlehttp/promises": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.3.1",
|
||||
"guzzlehttp/psr7": "^1.4",
|
||||
"php": ">=5.5"
|
||||
},
|
||||
"require-dev": {
|
||||
|
@ -975,7 +975,7 @@
|
|||
"rest",
|
||||
"web service"
|
||||
],
|
||||
"time": "2016-10-08T15:01:37+00:00"
|
||||
"time": "2017-02-28T22:50:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
|
@ -1030,16 +1030,16 @@
|
|||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.3.1",
|
||||
"version": "1.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b"
|
||||
"reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
|
||||
"reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/0d6c7ca039329247e4f0f8f8f6506810e8248855",
|
||||
"reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1075,16 +1075,23 @@
|
|||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
"description": "PSR-7 message implementation",
|
||||
"description": "PSR-7 message implementation that also provides common utility methods",
|
||||
"keywords": [
|
||||
"http",
|
||||
"message",
|
||||
"request",
|
||||
"response",
|
||||
"stream",
|
||||
"uri"
|
||||
"uri",
|
||||
"url"
|
||||
],
|
||||
"time": "2016-06-24T23:00:38+00:00"
|
||||
"time": "2017-02-27T10:51:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "indieauth/client",
|
||||
|
@ -1375,23 +1382,23 @@
|
|||
},
|
||||
{
|
||||
"name": "jonnybarnes/emoji-a11y",
|
||||
"version": "v0.1.1",
|
||||
"version": "v0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jonnybarnes/emoji-a11y.git",
|
||||
"reference": "bb9d7427bdaab139d746de1c4273fea6ebc52206"
|
||||
"reference": "ee9062d345ce05c02036b5d5a990b3b0e8bfc34f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jonnybarnes/emoji-a11y/zipball/bb9d7427bdaab139d746de1c4273fea6ebc52206",
|
||||
"reference": "bb9d7427bdaab139d746de1c4273fea6ebc52206",
|
||||
"url": "https://api.github.com/repos/jonnybarnes/emoji-a11y/zipball/ee9062d345ce05c02036b5d5a990b3b0e8bfc34f",
|
||||
"reference": "ee9062d345ce05c02036b5d5a990b3b0e8bfc34f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~5.7"
|
||||
"phpunit/phpunit": "~6.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
|
@ -1415,7 +1422,7 @@
|
|||
"accessibility",
|
||||
"emoji"
|
||||
],
|
||||
"time": "2017-02-02T00:20:12+00:00"
|
||||
"time": "2017-02-15T17:23:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jonnybarnes/indieweb",
|
||||
|
@ -1510,16 +1517,16 @@
|
|||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v5.4.12",
|
||||
"version": "v5.4.15",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "707f32d32dce58232f7a860e0a1d62caf6f9dbfc"
|
||||
"reference": "ecc6468b8af30b77566a8519ce8898740ef691d7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/707f32d32dce58232f7a860e0a1d62caf6f9dbfc",
|
||||
"reference": "707f32d32dce58232f7a860e0a1d62caf6f9dbfc",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/ecc6468b8af30b77566a8519ce8898740ef691d7",
|
||||
"reference": "ecc6468b8af30b77566a8519ce8898740ef691d7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1635,20 +1642,20 @@
|
|||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
"time": "2017-02-15T14:31:32+00:00"
|
||||
"time": "2017-03-02T14:41:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/scout",
|
||||
"version": "v3.0.1",
|
||||
"version": "v3.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/scout.git",
|
||||
"reference": "c742ada38f7056dba336dae441d9eaf11000cb76"
|
||||
"reference": "1ddb0fa6f165bf6a69864960102062e7cf3f989d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/scout/zipball/c742ada38f7056dba336dae441d9eaf11000cb76",
|
||||
"reference": "c742ada38f7056dba336dae441d9eaf11000cb76",
|
||||
"url": "https://api.github.com/repos/laravel/scout/zipball/1ddb0fa6f165bf6a69864960102062e7cf3f989d",
|
||||
"reference": "1ddb0fa6f165bf6a69864960102062e7cf3f989d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1695,7 +1702,7 @@
|
|||
"laravel",
|
||||
"search"
|
||||
],
|
||||
"time": "2017-02-01T16:57:41+00:00"
|
||||
"time": "2017-03-01T14:37:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/tinker",
|
||||
|
@ -2451,16 +2458,16 @@
|
|||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
"version": "v2.0.4",
|
||||
"version": "v2.0.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paragonie/random_compat.git",
|
||||
"reference": "a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e"
|
||||
"reference": "b5ea1ef3d8ff10c307ba8c5945c2f134e503278f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e",
|
||||
"reference": "a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e",
|
||||
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/b5ea1ef3d8ff10c307ba8c5945c2f134e503278f",
|
||||
"reference": "b5ea1ef3d8ff10c307ba8c5945c2f134e503278f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2495,7 +2502,7 @@
|
|||
"pseudorandom",
|
||||
"random"
|
||||
],
|
||||
"time": "2016-11-07T23:38:38+00:00"
|
||||
"time": "2017-02-27T17:11:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "patchwork/utf8",
|
||||
|
@ -2810,16 +2817,16 @@
|
|||
},
|
||||
{
|
||||
"name": "psy/psysh",
|
||||
"version": "v0.8.1",
|
||||
"version": "v0.8.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/bobthecow/psysh.git",
|
||||
"reference": "701e8a1cc426ee170f1296f5d9f6b8a26ad25c4a"
|
||||
"reference": "97113db4107a4126bef933b60fea6dbc9f615d41"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/701e8a1cc426ee170f1296f5d9f6b8a26ad25c4a",
|
||||
"reference": "701e8a1cc426ee170f1296f5d9f6b8a26ad25c4a",
|
||||
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/97113db4107a4126bef933b60fea6dbc9f615d41",
|
||||
"reference": "97113db4107a4126bef933b60fea6dbc9f615d41",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2879,7 +2886,7 @@
|
|||
"interactive",
|
||||
"shell"
|
||||
],
|
||||
"time": "2017-01-15T17:54:13+00:00"
|
||||
"time": "2017-03-01T00:13:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
|
@ -2965,16 +2972,16 @@
|
|||
},
|
||||
{
|
||||
"name": "sensiolabs/security-checker",
|
||||
"version": "v4.0.0",
|
||||
"version": "v4.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sensiolabs/security-checker.git",
|
||||
"reference": "116027b57b568ed61b7b1c80eeb4f6ee9e8c599c"
|
||||
"reference": "f2ce0035fc512287978510ca1740cd111d60f89f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/116027b57b568ed61b7b1c80eeb4f6ee9e8c599c",
|
||||
"reference": "116027b57b568ed61b7b1c80eeb4f6ee9e8c599c",
|
||||
"url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/f2ce0035fc512287978510ca1740cd111d60f89f",
|
||||
"reference": "f2ce0035fc512287978510ca1740cd111d60f89f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3005,7 +3012,7 @@
|
|||
}
|
||||
],
|
||||
"description": "A security checker for your composer.lock",
|
||||
"time": "2016-09-23T18:09:57+00:00"
|
||||
"time": "2017-02-18T17:53:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-glide",
|
||||
|
@ -3280,16 +3287,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v3.2.3",
|
||||
"version": "v3.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "7a8405a9fc175f87fed8a3c40856b0d866d61936"
|
||||
"reference": "0e5e6899f82230fcb1153bcaf0e106ffaa44b870"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/7a8405a9fc175f87fed8a3c40856b0d866d61936",
|
||||
"reference": "7a8405a9fc175f87fed8a3c40856b0d866d61936",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/0e5e6899f82230fcb1153bcaf0e106ffaa44b870",
|
||||
"reference": "0e5e6899f82230fcb1153bcaf0e106ffaa44b870",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3339,20 +3346,20 @@
|
|||
],
|
||||
"description": "Symfony Console Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-02-06T12:04:21+00:00"
|
||||
"time": "2017-02-16T14:07:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
"version": "v3.1.10",
|
||||
"version": "v3.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/css-selector.git",
|
||||
"reference": "722a87478a72d95dc2a3bcf41dc9c2d13fd4cb2d"
|
||||
"reference": "f0e628f04fc055c934b3211cfabdb1c59eefbfaa"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/722a87478a72d95dc2a3bcf41dc9c2d13fd4cb2d",
|
||||
"reference": "722a87478a72d95dc2a3bcf41dc9c2d13fd4cb2d",
|
||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/f0e628f04fc055c934b3211cfabdb1c59eefbfaa",
|
||||
"reference": "f0e628f04fc055c934b3211cfabdb1c59eefbfaa",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3361,7 +3368,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.1-dev"
|
||||
"dev-master": "3.2-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -3392,20 +3399,20 @@
|
|||
],
|
||||
"description": "Symfony CssSelector Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-01-02T20:31:54+00:00"
|
||||
"time": "2017-01-02T20:32:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
"version": "v3.2.3",
|
||||
"version": "v3.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/debug.git",
|
||||
"reference": "b4d9818f127c60ce21ed62c395da7df868dc8477"
|
||||
"reference": "9b98854cb45bc59d100b7d4cc4cf9e05f21026b9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/b4d9818f127c60ce21ed62c395da7df868dc8477",
|
||||
"reference": "b4d9818f127c60ce21ed62c395da7df868dc8477",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/9b98854cb45bc59d100b7d4cc4cf9e05f21026b9",
|
||||
"reference": "9b98854cb45bc59d100b7d4cc4cf9e05f21026b9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3449,11 +3456,11 @@
|
|||
],
|
||||
"description": "Symfony Debug Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-01-28T02:37:08+00:00"
|
||||
"time": "2017-02-16T16:34:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v3.2.3",
|
||||
"version": "v3.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
|
@ -3513,7 +3520,7 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v3.2.3",
|
||||
"version": "v3.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
|
@ -3562,16 +3569,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v3.2.3",
|
||||
"version": "v3.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-foundation.git",
|
||||
"reference": "e192b04de44aa1ed0e39d6793f7e06f5e0b672a0"
|
||||
"reference": "a90da6dd679605d88c9803a57a6fc1fb7a19a6e0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/e192b04de44aa1ed0e39d6793f7e06f5e0b672a0",
|
||||
"reference": "e192b04de44aa1ed0e39d6793f7e06f5e0b672a0",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/a90da6dd679605d88c9803a57a6fc1fb7a19a6e0",
|
||||
"reference": "a90da6dd679605d88c9803a57a6fc1fb7a19a6e0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3611,20 +3618,20 @@
|
|||
],
|
||||
"description": "Symfony HttpFoundation Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-02-02T13:47:35+00:00"
|
||||
"time": "2017-02-16T22:46:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
"version": "v3.2.3",
|
||||
"version": "v3.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-kernel.git",
|
||||
"reference": "96443239baf674b143604fb87cb27cb01672ab77"
|
||||
"reference": "4cd0d4bc31819095c6ef13573069f621eb321081"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/96443239baf674b143604fb87cb27cb01672ab77",
|
||||
"reference": "96443239baf674b143604fb87cb27cb01672ab77",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/4cd0d4bc31819095c6ef13573069f621eb321081",
|
||||
"reference": "4cd0d4bc31819095c6ef13573069f621eb321081",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3693,7 +3700,7 @@
|
|||
],
|
||||
"description": "Symfony HttpKernel Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-02-06T13:15:19+00:00"
|
||||
"time": "2017-02-16T23:59:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
|
@ -3756,16 +3763,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v3.2.3",
|
||||
"version": "v3.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "32646a7cf53f3956c76dcb5c82555224ae321858"
|
||||
"reference": "0ab87c1e7570b3534a6e51eb4ca8e9f6d7327856"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/32646a7cf53f3956c76dcb5c82555224ae321858",
|
||||
"reference": "32646a7cf53f3956c76dcb5c82555224ae321858",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/0ab87c1e7570b3534a6e51eb4ca8e9f6d7327856",
|
||||
"reference": "0ab87c1e7570b3534a6e51eb4ca8e9f6d7327856",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3801,11 +3808,11 @@
|
|||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-02-03T12:11:38+00:00"
|
||||
"time": "2017-02-16T14:07:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/routing",
|
||||
"version": "v3.2.3",
|
||||
"version": "v3.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/routing.git",
|
||||
|
@ -3880,16 +3887,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
"version": "v3.2.3",
|
||||
"version": "v3.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation.git",
|
||||
"reference": "ca032cc56976d88b85e7386b17020bc6dc95dbc5"
|
||||
"reference": "d6825c6bb2f1da13f564678f9f236fe8242c0029"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/ca032cc56976d88b85e7386b17020bc6dc95dbc5",
|
||||
"reference": "ca032cc56976d88b85e7386b17020bc6dc95dbc5",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/d6825c6bb2f1da13f564678f9f236fe8242c0029",
|
||||
"reference": "d6825c6bb2f1da13f564678f9f236fe8242c0029",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3940,20 +3947,20 @@
|
|||
],
|
||||
"description": "Symfony Translation Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-01-21T17:06:35+00:00"
|
||||
"time": "2017-02-16T22:46:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v3.2.3",
|
||||
"version": "v3.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "5bb4435a03a4f05c211f4a9a8ee2756965924511"
|
||||
"reference": "cb50260b674ee1c2d4ab49f2395a42e0b4681e20"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/5bb4435a03a4f05c211f4a9a8ee2756965924511",
|
||||
"reference": "5bb4435a03a4f05c211f4a9a8ee2756965924511",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/cb50260b674ee1c2d4ab49f2395a42e0b4681e20",
|
||||
"reference": "cb50260b674ee1c2d4ab49f2395a42e0b4681e20",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4003,7 +4010,7 @@
|
|||
"debug",
|
||||
"dump"
|
||||
],
|
||||
"time": "2017-01-24T12:58:58+00:00"
|
||||
"time": "2017-02-16T22:46:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "themattharris/tmhoauth",
|
||||
|
@ -4298,6 +4305,55 @@
|
|||
],
|
||||
"time": "2015-06-14T21:17:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "facebook/webdriver",
|
||||
"version": "1.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facebook/php-webdriver.git",
|
||||
"reference": "77300c4ab2025d4316635f592ec849ca7323bd8c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/facebook/php-webdriver/zipball/77300c4ab2025d4316635f592ec849ca7323bd8c",
|
||||
"reference": "77300c4ab2025d4316635f592ec849ca7323bd8c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-curl": "*",
|
||||
"php": "^5.5 || ~7.0",
|
||||
"symfony/process": "^2.8 || ^3.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^1.11",
|
||||
"php-mock/php-mock-phpunit": "^1.1",
|
||||
"phpunit/phpunit": "4.6.* || ~5.0",
|
||||
"satooshi/php-coveralls": "^1.0",
|
||||
"squizlabs/php_codesniffer": "^2.6"
|
||||
},
|
||||
"suggest": {
|
||||
"phpdocumentor/phpdocumentor": "2.*"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Facebook\\WebDriver\\": "lib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"description": "A PHP client for WebDriver",
|
||||
"homepage": "https://github.com/facebook/php-webdriver",
|
||||
"keywords": [
|
||||
"facebook",
|
||||
"php",
|
||||
"selenium",
|
||||
"webdriver"
|
||||
],
|
||||
"time": "2017-01-13T15:48:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "fzaninotto/faker",
|
||||
"version": "v1.6.0",
|
||||
|
@ -4439,23 +4495,30 @@
|
|||
"time": "2015-12-15T10:42:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/browser-kit-testing",
|
||||
"version": "v1.0.3",
|
||||
"name": "laravel/dusk",
|
||||
"version": "v1.0.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/browser-kit-testing.git",
|
||||
"reference": "0adfb725147815bff5516d157577f375a6e66ebd"
|
||||
"url": "https://github.com/laravel/dusk.git",
|
||||
"reference": "9d7f1b76f1624d7ce39c93223960f1acff5ad075"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/browser-kit-testing/zipball/0adfb725147815bff5516d157577f375a6e66ebd",
|
||||
"reference": "0adfb725147815bff5516d157577f375a6e66ebd",
|
||||
"url": "https://api.github.com/repos/laravel/dusk/zipball/9d7f1b76f1624d7ce39c93223960f1acff5ad075",
|
||||
"reference": "9d7f1b76f1624d7ce39c93223960f1acff5ad075",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.9",
|
||||
"symfony/css-selector": "~3.1",
|
||||
"symfony/dom-crawler": "~3.1"
|
||||
"facebook/webdriver": "~1.0",
|
||||
"illuminate/support": "~5.3",
|
||||
"nesbot/carbon": "~1.20",
|
||||
"php": ">=5.6.4",
|
||||
"symfony/console": "~3.2",
|
||||
"symfony/process": "~3.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^0.9.6",
|
||||
"phpunit/phpunit": "^5.7"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
@ -4465,7 +4528,7 @@
|
|||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Laravel\\BrowserKitTesting\\": "src/"
|
||||
"Laravel\\Dusk\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
|
@ -4478,12 +4541,13 @@
|
|||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "Provides backwards compatibility for BrowserKit testing in Laravel 5.4.",
|
||||
"description": "Laravel Dusk provides simple end-to-end testing and browser automation.",
|
||||
"keywords": [
|
||||
"laravel",
|
||||
"testing"
|
||||
"testing",
|
||||
"webdriver"
|
||||
],
|
||||
"time": "2017-02-08T22:32:37+00:00"
|
||||
"time": "2017-03-01T15:57:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "maximebf/debugbar",
|
||||
|
@ -4548,16 +4612,16 @@
|
|||
},
|
||||
{
|
||||
"name": "mockery/mockery",
|
||||
"version": "0.9.8",
|
||||
"version": "0.9.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/padraic/mockery.git",
|
||||
"reference": "1e5e2ffdc4d71d7358ed58a6fdd30a4a0c506855"
|
||||
"reference": "6fdb61243844dc924071d3404bb23994ea0b6856"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/padraic/mockery/zipball/1e5e2ffdc4d71d7358ed58a6fdd30a4a0c506855",
|
||||
"reference": "1e5e2ffdc4d71d7358ed58a6fdd30a4a0c506855",
|
||||
"url": "https://api.github.com/repos/padraic/mockery/zipball/6fdb61243844dc924071d3404bb23994ea0b6856",
|
||||
"reference": "6fdb61243844dc924071d3404bb23994ea0b6856",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4609,7 +4673,7 @@
|
|||
"test double",
|
||||
"testing"
|
||||
],
|
||||
"time": "2017-02-09T13:29:38+00:00"
|
||||
"time": "2017-02-28T12:52:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
|
@ -4864,35 +4928,35 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "c19cfc7cbb0e9338d8c469c7eedecc2a428b0971"
|
||||
"reference": "09e2277d14ea467e5a984010f501343ef29ffc69"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c19cfc7cbb0e9338d8c469c7eedecc2a428b0971",
|
||||
"reference": "c19cfc7cbb0e9338d8c469c7eedecc2a428b0971",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/09e2277d14ea467e5a984010f501343ef29ffc69",
|
||||
"reference": "09e2277d14ea467e5a984010f501343ef29ffc69",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"php": "^5.6 || ^7.0",
|
||||
"phpunit/php-file-iterator": "~1.3",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-token-stream": "^1.4.2",
|
||||
"sebastian/code-unit-reverse-lookup": "~1.0",
|
||||
"phpunit/php-file-iterator": "^1.3",
|
||||
"phpunit/php-text-template": "^1.2",
|
||||
"phpunit/php-token-stream": "^1.4.2 || ^2.0",
|
||||
"sebastian/code-unit-reverse-lookup": "^1.0",
|
||||
"sebastian/environment": "^1.3.2 || ^2.0",
|
||||
"sebastian/version": "~1.0|~2.0"
|
||||
"sebastian/version": "^1.0 || ^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-xdebug": ">=2.1.4",
|
||||
"phpunit/phpunit": "^5.4"
|
||||
"ext-xdebug": "^2.1.4",
|
||||
"phpunit/phpunit": "^5.7"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "*",
|
||||
"ext-xdebug": ">=2.4.0",
|
||||
"ext-xmlwriter": "*"
|
||||
"ext-xdebug": "^2.5.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
@ -4923,7 +4987,7 @@
|
|||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2017-01-20T15:06:43+00:00"
|
||||
"time": "2017-03-01T09:12:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
|
@ -5015,25 +5079,30 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/php-timer",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
||||
"reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260"
|
||||
"reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260",
|
||||
"reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
|
||||
"reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
"php": "^5.3.3 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4|~5"
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
|
@ -5055,20 +5124,20 @@
|
|||
"keywords": [
|
||||
"timer"
|
||||
],
|
||||
"time": "2016-05-12T18:03:57+00:00"
|
||||
"time": "2017-02-26T11:10:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-token-stream",
|
||||
"version": "1.4.9",
|
||||
"version": "1.4.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
||||
"reference": "3b402f65a4cc90abf6e1104e388b896ce209631b"
|
||||
"reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b",
|
||||
"reference": "3b402f65a4cc90abf6e1104e388b896ce209631b",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7",
|
||||
"reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -5104,20 +5173,20 @@
|
|||
"keywords": [
|
||||
"tokenizer"
|
||||
],
|
||||
"time": "2016-11-15T14:06:22+00:00"
|
||||
"time": "2017-02-27T10:12:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "5.7.13",
|
||||
"version": "5.7.15",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "60ebeed87a35ea46fd7f7d8029df2d6f013ebb34"
|
||||
"reference": "b99112aecc01f62acf3d81a3f59646700a1849e5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/60ebeed87a35ea46fd7f7d8029df2d6f013ebb34",
|
||||
"reference": "60ebeed87a35ea46fd7f7d8029df2d6f013ebb34",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b99112aecc01f62acf3d81a3f59646700a1849e5",
|
||||
"reference": "b99112aecc01f62acf3d81a3f59646700a1849e5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -5141,7 +5210,7 @@
|
|||
"sebastian/global-state": "^1.1",
|
||||
"sebastian/object-enumerator": "~2.0",
|
||||
"sebastian/resource-operations": "~1.0",
|
||||
"sebastian/version": "~1.0|~2.0",
|
||||
"sebastian/version": "~1.0.3|~2.0",
|
||||
"symfony/yaml": "~2.1|~3.0"
|
||||
},
|
||||
"conflict": {
|
||||
|
@ -5186,7 +5255,7 @@
|
|||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2017-02-10T09:05:10+00:00"
|
||||
"time": "2017-03-02T15:22:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
|
@ -5578,16 +5647,16 @@
|
|||
},
|
||||
{
|
||||
"name": "sebastian/object-enumerator",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
|
||||
"reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35"
|
||||
"reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35",
|
||||
"reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7",
|
||||
"reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -5620,7 +5689,7 @@
|
|||
],
|
||||
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
|
||||
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
|
||||
"time": "2016-11-19T07:35:10+00:00"
|
||||
"time": "2017-02-18T15:18:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/recursion-context",
|
||||
|
@ -5760,74 +5829,18 @@
|
|||
"homepage": "https://github.com/sebastianbergmann/version",
|
||||
"time": "2016-10-03T07:35:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dom-crawler",
|
||||
"version": "v3.1.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/dom-crawler.git",
|
||||
"reference": "7eede2a901a19928494194f7d1815a77b9a473a0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/7eede2a901a19928494194f7d1815a77b9a473a0",
|
||||
"reference": "7eede2a901a19928494194f7d1815a77b9a473a0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.9",
|
||||
"symfony/polyfill-mbstring": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/css-selector": "~2.8|~3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/css-selector": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\DomCrawler\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony DomCrawler Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-01-21T17:13:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v3.2.3",
|
||||
"version": "v3.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "e1718c6bf57e1efbb8793ada951584b2ab27775b"
|
||||
"reference": "9724c684646fcb5387d579b4bfaa63ee0b0c64c8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/e1718c6bf57e1efbb8793ada951584b2ab27775b",
|
||||
"reference": "e1718c6bf57e1efbb8793ada951584b2ab27775b",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/9724c684646fcb5387d579b4bfaa63ee0b0c64c8",
|
||||
"reference": "9724c684646fcb5387d579b4bfaa63ee0b0c64c8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -5869,7 +5882,7 @@
|
|||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-01-21T17:06:35+00:00"
|
||||
"time": "2017-02-16T22:46:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
|
@ -5930,8 +5943,7 @@
|
|||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"ext-intl": "*",
|
||||
"php": ">=7.0.0"
|
||||
"php": ">=7.1.0"
|
||||
},
|
||||
"platform-dev": []
|
||||
}
|
||||
|
|
25
config/admin.php
Normal file
25
config/admin.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Admin Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The username of the admin account.
|
||||
*/
|
||||
|
||||
'user' => env('ADMIN_USER'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Admin Password
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The password of the admin account.
|
||||
*/
|
||||
|
||||
'pass' => env('ADMIN_PASS'),
|
||||
|
||||
];
|
|
@ -53,6 +53,17 @@ return [
|
|||
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Long URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The short URL for the application
|
||||
|
|
||||
*/
|
||||
|
||||
'longurl' => env('APP_LONGURL', 'longurl.local'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Short URL
|
||||
|
@ -62,7 +73,18 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'shorturl' => env('APP_SHORTURL', 'http://shorturl.local'),
|
||||
'shorturl' => env('APP_SHORTURL', 'shorturl.local'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Display Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The display name for the application, used for example in titles.
|
||||
|
|
||||
*/
|
||||
|
||||
'display_name' => env('DISPLAY_NAME', 'Joe Bloggs'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -161,7 +161,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'secure' => true,
|
||||
'secure' => (config('app.env') != 'testing'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
17
deploy.sh
Executable file
17
deploy.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Putting the Laravel app in maintenance mode"
|
||||
php artisan down
|
||||
|
||||
echo "Updating composer dependencies"
|
||||
composer install
|
||||
|
||||
echo "Caching Laravel route and config files"
|
||||
php artisan route:cache
|
||||
php artisan config:cache
|
||||
|
||||
echo "Restarting the queue daemon"
|
||||
sudo systemctl restart supervisorctl
|
||||
|
||||
echo "Bringing the Laravel app back online"
|
||||
php artisan up
|
10
phpunit.xml
10
phpunit.xml
|
@ -9,16 +9,16 @@
|
|||
processIsolation="false"
|
||||
stopOnFailure="false">
|
||||
<testsuites>
|
||||
<testsuite name="Application Test Suite">
|
||||
<directory suffix="Test.php">./tests</directory>
|
||||
<testsuite name="Feature Tests">
|
||||
<directory suffix="Test.php">./tests/Feature</directory>
|
||||
</testsuite>
|
||||
<testsuite name="Unit Tests">
|
||||
<directory suffix="Test.php">./tests/Unit</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">./app</directory>
|
||||
<exclude>
|
||||
<file>./app/Http/routes.php</file>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<php>
|
||||
|
|
4
public/assets/css/app.css
vendored
4
public/assets/css/app.css
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
@ -1 +1,16 @@
|
|||
{"version":3,"sources":["../../../resources/assets/sass/app.scss","../../../resources/assets/sass/layout.scss","../../../resources/assets/sass/styles.scss","../../../resources/assets/sass/pagination.scss","../../../resources/assets/sass/note-form.scss","../../../resources/assets/sass/mapbox.scss","../../../resources/assets/sass/contacts.scss","../../../resources/assets/sass/emoji.scss"],"names":[],"mappings":"AAIA,KACI,sBACA,cAAe,CAClB,qBAKG,kBAAmB,CACtB,KCVG,eACA,cACA,iBACA,kBACA,oBAAqB,CACxB,WAGG,iBAAkB,CACrB,SAGG,gBAAiB,CACpB,MAGG,oBACA,AADA,aACA,4BAAsB,AAAtB,6BAAsB,AAAtB,qBAAsB,CACzB,eAGG,oBACA,AADA,aACA,8BACA,AADA,6BACA,AADA,mBACA,yBACA,AADA,8BACA,gBAAiB,CACpB,cAGG,oBACA,AADA,aACA,yBAAmB,AAAnB,kBAAmB,CACtB,kBAGG,gBAAiB,CACpB,iBAGG,qBACA,WAAY,CACf,aAGG,eACA,yBAA0B,CAC7B,OAGG,eAAgB,CACnB,cAGG,eAAgB,CACnB,WAGG,eACA,cACA,iBAAkB,CACrB,sBAGG,cAAe,CAClB,sBAGG,iBACA,cAAe,CAClB,WAGG,kBACA,WACA,SACA,qBAAsB,CACzB,SAGG,kBACA,MACA,OACA,WACA,WAAY,CACf,KCjFG,6JAWc,CACjB,EAGG,qBACA,wBACA,UAAW,CACd,gBAGG,kBAAmB,CACtB,MAGG,WACA,UAAW,CACd,OAGG,iBACA,iBAAkB,CACrB,WAGG,kBAAmB,CACtB,UAGG,YACA,WAAY,CACf,YC1CG,WACA,YACA,oBACA,AADA,aACA,8BACA,AADA,6BACA,AADA,mBACA,yBACA,AADA,8BACA,yBAAmB,AAAnB,kBAAmB,CACtB,eAGG,oBAAqB,CACxB,SCVG,oBACA,AADA,aACA,4BAAsB,AAAtB,6BAAsB,AAAtB,qBAAsB,CACzB,0BAGG,aACI,oBACA,AADA,aACA,8BACA,AADA,6BACA,AADA,mBACA,cAAe,CAClB,CAGL,0BACI,sBACI,UAAW,CACd,CAGL,eACI,UACA,oBACA,gBAAiB,CACpB,oDAIG,mBAAO,AAAP,MAAO,CACV,kBAGG,qBAAsB,CACzB,QAGG,mBAAoB,CACvB,KCnCG,eACA,YAAa,CAChB,QAGG,y4HACA,wBACA,WACA,WAAY,CACf,UAGG,kBACA,MACA,OACA,iBACA,cAAe,CAClB,gBAGG,gBACA,gBAAiB,CACpB,SCtBG,oBACA,AADA,aACA,8BACA,AADA,6BACA,AADA,mBACA,eACA,6BAA8B,CACjC,aAGG,oBACA,YACA,YAAa,CAChB,sDCPG,iBAAkB,CACrB,gFAIG,kBACA,cACA,UACA,aACA,OACA,cACA,qBACA,yBACA,oBACA,oCACA,yBACA,kCACA,WACA,cACA,0CAAkC,AAAlC,iCAAkC,CACrC,2BAGG,KACI,aACA,6BACA,wCACA,0BACA,qBAAkC,CAGtC,GACI,aACA,kCACA,yBACA,WACA,mCAAgD,CAAA,CAIxD,AApBC,mBAGG,KACI,aACA,6BACA,wCACA,0BACA,qBAAkC,CAGtC,GACI,aACA,kCACA,yBACA,WACA,mCAAgD,CAAA,CAIxD,aACI,kCACI,kCAAmC,CACtC,CAAA","file":"app.css"}
|
||||
{
|
||||
"version": 3,
|
||||
"file": "app.css",
|
||||
"sources": [
|
||||
"../../../resources/assets/sass/app.scss",
|
||||
"../../../resources/assets/sass/layout.scss",
|
||||
"../../../resources/assets/sass/styles.scss",
|
||||
"../../../resources/assets/sass/pagination.scss",
|
||||
"../../../resources/assets/sass/note-form.scss",
|
||||
"../../../resources/assets/sass/mapbox.scss",
|
||||
"../../../resources/assets/sass/contacts.scss",
|
||||
"../../../resources/assets/sass/emoji.scss"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": "AAIA,AAAA,IAAI,AAAC,CACD,UAAU,CAAE,UAAU,CACtB,SAAS,CAAE,IAAI,CAClB,AAED,AAAA,CAAC,CACD,AAAA,CAAC,AAAA,QAAQ,CACT,AAAA,CAAC,AAAA,OAAO,AAAC,CACL,UAAU,CAAE,OAAO,CACtB,ACXD,AAAA,IAAI,AAAC,CACD,SAAS,CAAE,IAAI,CACf,MAAM,CAAE,MAAM,CACd,YAAY,CAAE,GAAG,CACjB,aAAa,CAAE,GAAG,CAClB,SAAS,CAAE,UAAU,CACxB,AAED,AAAA,UAAU,AAAC,CACP,UAAU,CAAE,MAAM,CACrB,AAED,AAAA,QAAQ,AAAC,CACL,WAAW,CAAE,IAAI,CACpB,AAED,AAAA,KAAK,AAAC,CACF,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,MAAM,CACzB,AAED,AAAA,cAAc,AAAC,CACX,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,GAAG,CACnB,eAAe,CAAE,aAAa,CAC9B,SAAS,CAAE,MAAM,CACpB,AAED,AAAA,aAAa,AAAC,CACV,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,MAAM,CACtB,AAED,AAAc,aAAD,CAAC,GAAG,AAAC,CACd,YAAY,CAAE,GAAG,CACpB,AAED,AAAa,YAAD,CAAC,GAAG,AAAC,CACb,OAAO,CAAE,YAAY,CACrB,MAAM,CAAE,IAAI,CACf,AAED,AAAO,IAAH,CAAG,OAAO,AAAC,CACX,UAAU,CAAE,GAAG,CACf,UAAU,CAAE,cAAc,CAC7B,AAED,AAAA,MAAM,AAAC,CACH,UAAU,CAAE,IAAI,CACnB,AAED,AAAO,MAAD,CAAC,MAAM,AAAC,CACV,WAAW,CAAE,GAAG,CACnB,AAED,AAAA,UAAU,AAAC,CACP,UAAU,CAAE,GAAG,CACf,OAAO,CAAE,KAAK,CACd,SAAS,CAAE,OAAO,CACrB,AAED,AAAkB,UAAR,AAAA,OAAO,CAAC,GAAG,AAAC,CAClB,MAAM,CAAE,OAAO,CAClB,AAED,AAAW,UAAD,CAAC,UAAU,AAAC,CAClB,UAAU,CAAE,KAAK,CACjB,SAAS,CAAE,IAAI,CAClB,AAED,AAAA,UAAU,AAAC,CACP,QAAQ,CAAE,QAAQ,CAClB,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,CAAC,CACT,cAAc,CAAE,MAAM,CACzB,AAED,AAAA,QAAQ,AAAC,CACL,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,CAAC,CACN,IAAI,CAAE,CAAC,CACP,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACf,ACnFD,AAAA,IAAI,AAAC,CAED,WAAW,CACP,iJAUU,CACjB,AAED,AAAA,CAAC,AAAC,CACE,eAAe,CAAE,IAAI,CACrB,aAAa,CAAE,SAAS,CACxB,KAAK,CAAE,IAAI,CACd,AAED,AAAc,aAAD,CAAC,CAAC,AAAC,CACZ,aAAa,CAAE,IAAI,CACtB,AAED,AAAA,KAAK,AAAC,CACF,MAAM,CAAE,GAAG,CACX,KAAK,CAAE,IAAI,CACd,AAED,AAAA,MAAM,AAAC,CACH,SAAS,CAAE,MAAM,CACjB,UAAU,CAAE,MAAM,CACrB,AAED,AAAW,MAAL,CAAC,CAAC,CAAG,CAAC,AAAC,CACT,aAAa,CAAE,IAAI,CACtB,AAED,AAAA,SAAS,AAAC,CACN,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,IAAI,CACf,AC3CD,AAAA,WAAW,AAAC,CACR,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,GAAG,CACnB,eAAe,CAAE,aAAa,CAC9B,WAAW,CAAE,MAAM,CACtB,AAED,AAAY,WAAD,CAAC,EAAE,AAAC,CACX,eAAe,CAAE,IAAI,CACxB,ACXD,AAAA,QAAQ,AAAC,CACL,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,MAAM,CACzB,AAED,MAAM,EAAE,SAAS,EAAE,KAAK,EACpB,AAAW,QAAH,CAAG,GAAG,AAAC,CACX,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,GAAG,CACnB,OAAO,CAAE,MAAM,CAClB,CAGL,MAAM,EAAE,SAAS,EAAE,KAAK,EACpB,AAAA,KAAK,CAAA,AAAA,IAAC,CAAK,SAAS,AAAd,CAAgB,CAClB,KAAK,CAAE,IAAI,CACd,CAGL,AAAS,QAAD,CAAC,KAAK,AAAC,CACX,KAAK,CAAE,GAAG,CACV,YAAY,CAAE,MAAM,CACpB,UAAU,CAAE,KAAK,CACpB,AAED,AAAS,QAAD,CAAC,KAAK,AAAA,IAAK,EAAA,AAAA,AAAA,IAAC,CAAD,MAAC,AAAA,GACpB,AAAS,QAAD,CAAC,QAAQ,AAAC,CACd,IAAI,CAAE,CAAC,CACV,AAED,AAAS,QAAD,CAAC,QAAQ,AAAC,CACd,OAAO,CAAE,aAAa,CACzB,AAED,AAAA,OAAO,AAAC,CACJ,YAAY,CAAE,MAAM,CACvB,ACpCD,AAAA,IAAI,AAAC,CACD,UAAU,CAAE,GAAG,CACf,MAAM,CAAE,KAAK,CAChB,AAED,AAAA,OAAO,AAAC,CACJ,gBAAgB,CAAE,u3HAAu3H,CACz4H,eAAe,CAAE,OAAO,CACxB,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACf,AAED,AAAA,SAAS,AAAC,CACN,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,CAAC,CACN,IAAI,CAAE,CAAC,CACP,UAAU,CAAE,KAAK,CACjB,OAAO,CAAE,MAAM,CAClB,AAED,AAAU,SAAD,CAAC,KAAK,AAAC,CACZ,WAAW,CAAE,GAAG,CAChB,YAAY,CAAE,GAAG,CACpB,ACvBD,AAAA,QAAQ,AAAC,CACL,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,GAAG,CACnB,UAAU,CAAE,GAAG,CACf,aAAa,CAAE,eAAe,CACjC,AAED,AAAS,QAAD,CAAC,GAAG,AAAC,CACT,YAAY,CAAE,MAAM,CACpB,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,KAAK,CAChB,ACTD,AAAA,IAAI,CAAA,AAAA,IAAC,CAAD,GAAC,AAAA,EAAS,AAAA,UAAC,AAAA,EACf,AAAA,IAAI,CAAA,AAAA,IAAC,CAAD,GAAC,AAAA,EAAS,AAAA,UAAC,AAAA,CAAY,CACvB,QAAQ,CAAE,QAAQ,CACrB,AAED,AAAA,IAAI,CAAA,AAAA,IAAC,CAAD,GAAC,AAAA,EAAS,AAAA,UAAC,AAAA,CAAW,MAAM,AAAA,OAAO,CACvC,AAAA,IAAI,CAAA,AAAA,IAAC,CAAD,GAAC,AAAA,EAAS,AAAA,UAAC,AAAA,CAAW,MAAM,AAAA,OAAO,AAAC,CACpC,QAAQ,CAAE,QAAQ,CAClB,OAAO,CAAE,KAAK,CACd,OAAO,CAAE,CAAC,CACV,MAAM,CAAE,KAAK,CACb,IAAI,CAAE,CAAC,CACP,SAAS,CAAE,GAAG,CACd,OAAO,CAAE,YAAY,CACrB,MAAM,CAAE,MAAM,CAAC,KAAK,CAAC,IAAsB,CAC3C,aAAa,CAAE,KAAK,CACpB,UAAU,CAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAgB,CAChD,OAAO,CAAE,gBAAgB,CACzB,gBAAgB,CAAE,gBAAmB,CACrC,KAAK,CAAE,IAAsB,CAC7B,SAAS,CAAE,GAAG,CACd,SAAS,CAAE,uBAAuB,CACrC,AAED,UAAU,CAAV,OAAU,CACN,AAAA,IAAI,CACA,MAAM,CAAE,KAAK,CACb,gBAAgB,CAAE,WAAgB,CAClC,MAAM,CAAE,MAAM,CAAC,KAAK,CAAC,mBAAsB,CAC3C,KAAK,CAAE,mBAAsB,CAC7B,UAAU,CAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAgB,CAGtC,AAAA,EAAE,CACE,MAAM,CAAE,KAAK,CACb,gBAAgB,CAAE,gBAAmB,CACrC,MAAM,CAAE,MAAM,CAAC,KAAK,CAAC,IAAsB,CAC3C,KAAK,CAAE,IAAsB,CAC7B,UAAU,CAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAgB,EAIxD,MAAM,CAAC,KAAK,CACR,AAAA,IAAI,CAAA,AAAA,IAAC,CAAD,GAAC,AAAA,EAAS,AAAA,UAAC,AAAA,CAAW,OAAO,AAAC,CAC9B,OAAO,CAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CACtC"
|
||||
}
|
1
public/assets/frontend/alertify.css
vendored
Normal file
1
public/assets/frontend/alertify.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.alertify-logs>*{padding:12px 24px;color:#fff;box-shadow:0 2px 5px 0 rgba(0,0,0,.2);border-radius:1px}.alertify-logs>*,.alertify-logs>.default{background:rgba(0,0,0,.8)}.alertify-logs>.error{background:rgba(244,67,54,.8)}.alertify-logs>.success{background:rgba(76,175,80,.9)}.alertify{position:fixed;background-color:rgba(0,0,0,.3);left:0;right:0;top:0;bottom:0;width:100%;height:100%;z-index:1}.alertify.hide{opacity:0;pointer-events:none}.alertify,.alertify.show{box-sizing:border-box;transition:all .33s cubic-bezier(.25,.8,.25,1)}.alertify,.alertify *{box-sizing:border-box}.alertify .dialog{padding:12px}.alertify .alert,.alertify .dialog{width:100%;margin:0 auto;position:relative;top:50%;transform:translateY(-50%)}.alertify .alert>*,.alertify .dialog>*{width:400px;max-width:95%;margin:0 auto;text-align:center;padding:12px;background:#fff;box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084)}.alertify .alert .msg,.alertify .dialog .msg{padding:12px;margin-bottom:12px;margin:0;text-align:left}.alertify .alert input:not(.form-control),.alertify .dialog input:not(.form-control){margin-bottom:15px;width:100%;font-size:100%;padding:12px}.alertify .alert input:not(.form-control):focus,.alertify .dialog input:not(.form-control):focus{outline-offset:-2px}.alertify .alert nav,.alertify .dialog nav{text-align:right}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button),.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button){background:transparent;box-sizing:border-box;color:rgba(0,0,0,.87);position:relative;outline:0;border:0;display:inline-block;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center;padding:0 6px;margin:6px 8px;line-height:36px;min-height:36px;white-space:nowrap;min-width:88px;text-align:center;text-transform:uppercase;font-size:14px;text-decoration:none;cursor:pointer;border:1px solid transparent;border-radius:2px}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover{background-color:rgba(0,0,0,.05)}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus{border:1px solid rgba(0,0,0,.1)}.alertify .alert nav button.btn,.alertify .dialog nav button.btn{margin:6px 4px}.alertify-logs{position:fixed;z-index:1}.alertify-logs.bottom,.alertify-logs:not(.top){bottom:16px}.alertify-logs.left,.alertify-logs:not(.right){left:16px}.alertify-logs.left>*,.alertify-logs:not(.right)>*{float:left;transform:translateZ(0);height:auto}.alertify-logs.left>.show,.alertify-logs:not(.right)>.show{left:0}.alertify-logs.left>*,.alertify-logs.left>.hide,.alertify-logs:not(.right)>*,.alertify-logs:not(.right)>.hide{left:-110%}.alertify-logs.right{right:16px}.alertify-logs.right>*{float:right;transform:translateZ(0)}.alertify-logs.right>.show{right:0;opacity:1}.alertify-logs.right>*,.alertify-logs.right>.hide{right:-110%;opacity:0}.alertify-logs.top{top:0}.alertify-logs>*{box-sizing:border-box;transition:all .4s cubic-bezier(.25,.8,.25,1);position:relative;clear:both;backface-visibility:hidden;perspective:1000;max-height:0;margin:0;padding:0;overflow:hidden;opacity:0;pointer-events:none}.alertify-logs>.show{margin-top:12px;opacity:1;max-height:1000px;padding:12px;pointer-events:auto}
|
BIN
public/assets/frontend/alertify.css.br
Normal file
BIN
public/assets/frontend/alertify.css.br
Normal file
Binary file not shown.
BIN
public/assets/frontend/alertify.css.gz
Normal file
BIN
public/assets/frontend/alertify.css.gz
Normal file
Binary file not shown.
|
@ -1 +1 @@
|
|||
!function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=18)}({18:function(t,e){var r=/watch\?v=([A-Za-z0-9\-_]+)\b/,n=/https\:\/\/play\.spotify\.com\/(.*)\b/,o=document.querySelectorAll(".e-content"),a=!0,i=!1,u=void 0;try{for(var c,l=o[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var s=c.value,d=s.textContent.match(r);if(d){var f=document.createElement("div");f.classList.add("container");var p=document.createElement("iframe");p.classList.add("youtube"),p.setAttribute("src","https://www.youtube.com/embed/"+d[1]),p.setAttribute("frameborder",0),p.setAttribute("allowfullscreen","true"),f.appendChild(p),s.appendChild(f)}var m=s.textContent.match(n);if(m){var b=m[1].replace("/",":"),y=document.createElement("iframe");y.classList.add("spotify"),y.setAttribute("src","https://embed.spotify.com/?uri=spotify:"+b),y.setAttribute("frameborder",0),y.setAttribute("allowtransparency","true"),s.appendChild(y)}console.log(s.innerHTML)}}catch(t){i=!0,u=t}finally{try{!a&&l.return&&l.return()}finally{if(i)throw u}}}});
|
||||
!function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=18)}({18:function(t,e){var r=/watch\?v=([A-Za-z0-9\-_]+)\b/,n=/https\:\/\/play\.spotify\.com\/(.*)\b/,o=document.querySelectorAll(".e-content"),a=!0,u=!1,i=void 0;try{for(var c,l=o[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var s=c.value,d=s.textContent.match(r);if(d){var f=document.createElement("div");f.classList.add("container");var p=document.createElement("iframe");p.classList.add("youtube"),p.setAttribute("src","https://www.youtube.com/embed/"+d[1]),p.setAttribute("frameborder",0),p.setAttribute("allowfullscreen","true"),f.appendChild(p),s.appendChild(f)}var m=s.textContent.match(n);if(m){var b=m[1].replace("/",":"),y=document.createElement("iframe");y.classList.add("spotify"),y.setAttribute("src","https://embed.spotify.com/?uri=spotify:"+b),y.setAttribute("frameborder",0),y.setAttribute("allowtransparency","true"),s.appendChild(y)}}}catch(t){u=!0,i=t}finally{try{!a&&l.return&&l.return()}finally{if(u)throw i}}}});
|
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
@ -46,7 +46,7 @@ const makeOptionsForForm = (map, position, places = null) => {
|
|||
|
||||
//position is output of navigator.geolocation call
|
||||
export default function addMapWithPlaces(div, position) {
|
||||
fetch('/places/near/' + position.coords.latitude + '/' + position.coords.longitude + '?u=' + position.coords.accuracy, {
|
||||
fetch('/micropub/places?latitude=' + position.coords.latitude + '&longitude=' + position.coords.longitude + '&u=' + position.coords.accuracy, {
|
||||
credentials: 'same-origin',
|
||||
method: 'get'
|
||||
}).then(function (response) {
|
||||
|
|
|
@ -82,7 +82,7 @@ export default function makeNewPlaceForm(map) {
|
|||
formData.append('place-latitude', document.querySelector('#place-latitude').value);
|
||||
formData.append('place-longitude', document.querySelector('#place-longitude').value);
|
||||
//post the new place
|
||||
fetch('/places/new', {
|
||||
fetch('/micropub/places', {
|
||||
//send cookies with the request
|
||||
credentials: 'same-origin',
|
||||
method: 'post',
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Delete Token? « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<form action="/admin/tokens/delete/{{ $id }}" method="post">
|
||||
<label for="delete">Are you sure you want to delete this token? </label><input type="checkbox" name="delete" id="delete">
|
||||
<br>
|
||||
<input type="submit" id="submit" value="Submit">
|
||||
</form>
|
||||
@stop
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Token Deleted « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>You have successfully deletd the token: {{ $id }}</p>
|
||||
@stop
|
|
@ -1,21 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
List Tokens « Admin CP
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<h1>Tokens</h1>
|
||||
<ul>
|
||||
@foreach($tokens as $token => $data)
|
||||
<li>{{ $token }}
|
||||
<ul>
|
||||
@foreach($data as $key => $value)
|
||||
<li>{{ $key }}: <?php if(is_array($value)) { echo '<ul>'; foreach($value as $scope) { echo "<li>$scope</li>"; } echo '</ul>'; } else { echo $value; }; ?></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<a href="/admin/tokens/delete/{{ $token }}">delete?</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@stop
|
|
@ -8,13 +8,13 @@ Admin CP
|
|||
<h1>Hello {{ $name }}!</h1>
|
||||
|
||||
<h2>Articles</h2>
|
||||
<p>You can either <a href="/admin/blog/new">create</a> new blog posts, or <a href="/admin/blog/edit">edit</a> them.<p>
|
||||
<p>You can either <a href="/admin/articles/new">create</a> new blog posts, or <a href="/admin/articles/edit">edit</a> them.<p>
|
||||
|
||||
<h2>Notes</h2>
|
||||
<p>You can either <a href="/admin/note/new">create</a> new notes, or <a href="/admin/note/edit">edit</a> them.<p>
|
||||
<p>You can either <a href="/admin/notes/new">create</a> new notes, or <a href="/admin/notes/edit">edit</a> them.<p>
|
||||
|
||||
<h2>Tokens</h2>
|
||||
<p>See all <a href="/admin/tokens">issued tokens</a>.</p>
|
||||
<h2>Clients</h2>
|
||||
<p>You can either <a href="/admin/clients/new">create</a> new contacts, or <a href="/admin/contacts/edit">edit</a> them.</p>
|
||||
|
||||
<h2>Contacts</h2>
|
||||
<p>You can either <a href="/admin/contacts/new">create</a> new contacts, or <a href="/admin/contacts/edit">edit</a> them.</p>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ env('DISPLAY_NAME') }}</title>
|
||||
<title>{{ config('app.display_name') }}</title>
|
||||
<atom:link href="{{ config('app.url') }}/feed" rel="self" type="application/rss+xml" />
|
||||
<description>An RSS feed of the blog posts found on {{ config('url.longurl') }}</description>
|
||||
<link>{{ config('app.url') }}</link>
|
|
@ -1,9 +0,0 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Contacts «
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@include('templates.contact', array('contact' => $contact))
|
||||
@stop
|
|
@ -6,6 +6,6 @@ Contacts «
|
|||
|
||||
@section('content')
|
||||
@foreach($contacts as $contact)
|
||||
@include('templates.contact', ['contact' => $contact])
|
||||
@include('templates.contact', ['contact' => $contact, 'image' => $contact->image])
|
||||
@endforeach
|
||||
@stop
|
9
resources/views/contacts/show.blade.php
Normal file
9
resources/views/contacts/show.blade.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')
|
||||
Contacts «
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@include('templates.contact', ['contact' => $contact, 'image' => $image])
|
||||
@stop
|
|
@ -3,8 +3,6 @@
|
|||
<head>
|
||||
<title>Be right back.</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
|
@ -17,31 +15,18 @@
|
|||
color: #B0BEC5;
|
||||
display: table;
|
||||
font-weight: 100;
|
||||
font-family: 'Lato';
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
font-family: sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 72px;
|
||||
margin-bottom: 40px;
|
||||
margin-top: 10rem;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
<div class="title">Be right back.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">Be right back.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue