first commit
This commit is contained in:
@@ -16,7 +16,8 @@
|
|||||||
"guzzlehttp/guzzle": "^6.3",
|
"guzzlehttp/guzzle": "^6.3",
|
||||||
"laravel/framework": "^7.24",
|
"laravel/framework": "^7.24",
|
||||||
"laravel/tinker": "^2.0",
|
"laravel/tinker": "^2.0",
|
||||||
"mtownsend/read-time": "^1.1"
|
"mtownsend/read-time": "^1.1",
|
||||||
|
"symfony/panther": "^0.7.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"facade/ignition": "^2.0",
|
"facade/ignition": "^2.0",
|
||||||
|
139
composer.lock
generated
139
composer.lock
generated
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "4258a59a9dc5e5b92894c963d718a365",
|
"content-hash": "41362fd417d7ab5e3fbfed6a6ad60125",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "asm89/stack-cors",
|
"name": "asm89/stack-cors",
|
||||||
@@ -1567,6 +1567,71 @@
|
|||||||
],
|
],
|
||||||
"time": "2018-07-02T15:55:56+00:00"
|
"time": "2018-07-02T15:55:56+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "php-webdriver/webdriver",
|
||||||
|
"version": "1.8.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-webdriver/php-webdriver.git",
|
||||||
|
"reference": "3308a70be084d6d7fd1ee5787b4c2e6eb4b70aab"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/3308a70be084d6d7fd1ee5787b4c2e6eb4b70aab",
|
||||||
|
"reference": "3308a70be084d6d7fd1ee5787b4c2e6eb4b70aab",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-curl": "*",
|
||||||
|
"ext-json": "*",
|
||||||
|
"ext-zip": "*",
|
||||||
|
"php": "^5.6 || ~7.0",
|
||||||
|
"symfony/polyfill-mbstring": "^1.12",
|
||||||
|
"symfony/process": "^2.8 || ^3.1 || ^4.0 || ^5.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^2.0",
|
||||||
|
"jakub-onderka/php-parallel-lint": "^1.0",
|
||||||
|
"php-coveralls/php-coveralls": "^2.0",
|
||||||
|
"php-mock/php-mock-phpunit": "^1.1",
|
||||||
|
"phpunit/phpunit": "^5.7",
|
||||||
|
"sebastian/environment": "^1.3.4 || ^2.0 || ^3.0",
|
||||||
|
"sminnee/phpunit-mock-objects": "^3.4",
|
||||||
|
"squizlabs/php_codesniffer": "^3.5",
|
||||||
|
"symfony/var-dumper": "^3.3 || ^4.0 || ^5.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-SimpleXML": "For Firefox profile creation"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.8.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Facebook\\WebDriver\\": "lib/"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"lib/Exception/TimeoutException.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"description": "A PHP client for Selenium WebDriver. Previously facebook/webdriver.",
|
||||||
|
"homepage": "https://github.com/php-webdriver/php-webdriver",
|
||||||
|
"keywords": [
|
||||||
|
"Chromedriver",
|
||||||
|
"geckodriver",
|
||||||
|
"php",
|
||||||
|
"selenium",
|
||||||
|
"webdriver"
|
||||||
|
],
|
||||||
|
"time": "2020-03-04T14:40:12+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "phpoption/phpoption",
|
"name": "phpoption/phpoption",
|
||||||
"version": "1.7.5",
|
"version": "1.7.5",
|
||||||
@@ -3077,6 +3142,78 @@
|
|||||||
],
|
],
|
||||||
"time": "2020-07-23T10:04:31+00:00"
|
"time": "2020-07-23T10:04:31+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/panther",
|
||||||
|
"version": "v0.7.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/panther.git",
|
||||||
|
"reference": "fcc7cfd2168db167daeb21ac5510fe06f2816a83"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/panther/zipball/fcc7cfd2168db167daeb21ac5510fe06f2816a83",
|
||||||
|
"reference": "fcc7cfd2168db167daeb21ac5510fe06f2816a83",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1",
|
||||||
|
"php-webdriver/webdriver": "^1.8.1",
|
||||||
|
"symfony/browser-kit": "^4.3 || ^5.0",
|
||||||
|
"symfony/dom-crawler": "^4.3 || ^5.0",
|
||||||
|
"symfony/http-client": "^4.3 || ^5.0",
|
||||||
|
"symfony/polyfill-php72": "^1.9",
|
||||||
|
"symfony/process": "^3.4 || ^4.0 || ^5.0"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"symfony/framework-bundle": ">=4.3 <4.3.4"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"fabpot/goutte": "^3.2.3",
|
||||||
|
"guzzlehttp/guzzle": "^6.3",
|
||||||
|
"symfony/css-selector": "^3.4 || ^4.0 || ^5.0",
|
||||||
|
"symfony/framework-bundle": "^3.4 || ^4.0 || ^5.0",
|
||||||
|
"symfony/mime": "^4.3 || ^5.0",
|
||||||
|
"symfony/phpunit-bridge": "^4.3.3 || ^5.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\Panther\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Kévin Dunglas",
|
||||||
|
"email": "dunglas@gmail.com",
|
||||||
|
"homepage": "https://dunglas.fr"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A browser testing and web scraping library for PHP and Symfony.",
|
||||||
|
"homepage": "https://dunglas.fr",
|
||||||
|
"keywords": [
|
||||||
|
"e2e",
|
||||||
|
"scraping",
|
||||||
|
"selenium",
|
||||||
|
"symfony",
|
||||||
|
"testing",
|
||||||
|
"webdriver"
|
||||||
|
],
|
||||||
|
"time": "2020-02-24T12:05:49+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
"version": "v1.18.1",
|
"version": "v1.18.1",
|
||||||
|
44
resources/views/ogimage.blade.php
Normal file
44
resources/views/ogimage.blade.php
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<title>OG image</title>
|
||||||
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@font-face {
|
||||||
|
font-family: "Mvaamu";
|
||||||
|
src: url("/fonts/mv-aammu-fk.ttf");
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="container mx-auto">
|
||||||
|
<div class="bg-green-100 mt-6 rounded-lg py-6 flex items-center max-w-6xl max-h-lg">
|
||||||
|
|
||||||
|
<div class="flex flex-grow-0 justify-between">
|
||||||
|
<div>
|
||||||
|
<img class="h-4/5 w-4/5 max-w-4/5 max-h-4/5 min-h-4/5 min-w-4/5"
|
||||||
|
src="{{$article->featured_image}}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ml-5 flex flex-col items-center">
|
||||||
|
<h1 class="text-right text-4xl mb-2 mr-5" style="font-family: Mvaamu; direction:rtl;">
|
||||||
|
{{$article->title}}
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
use App\Article;
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Web Routes
|
| Web Routes
|
||||||
@@ -13,6 +14,13 @@ use Illuminate\Support\Facades\Route;
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Route::get('/ogimage', function(Request $request) {
|
||||||
|
|
||||||
|
$article = Article::findOrFail($request->query('id'));
|
||||||
|
|
||||||
|
return view('ogimage', ['article' => $article]);
|
||||||
|
});
|
||||||
|
|
||||||
Route::get('{path}', function () {
|
Route::get('{path}', function () {
|
||||||
return view('app');
|
return view('app');
|
||||||
})->where('path', '(.*)');
|
})->where('path', '(.*)');
|
Reference in New Issue
Block a user