├── .eslintrc.js ├── .gitignore ├── .styleci.yml ├── LICENCE ├── README.md ├── composer.json ├── composer.lock ├── config └── laravel_pages.php ├── dist └── laravel_pages.js ├── mix-manifest.json ├── package-lock.json ├── package.json ├── src ├── Http │ └── Controllers │ │ └── PagesController.php ├── LaravelPagesServiceProvider.php ├── Migrations │ └── 0000_00_00_000000_create_pages_table.php ├── Models │ └── Page.php ├── public │ ├── css │ │ └── app.css │ ├── img │ │ └── wysiwyg │ │ │ ├── add_col_after.svg │ │ │ ├── add_col_before.svg │ │ │ ├── add_row_after.svg │ │ │ ├── add_row_before.svg │ │ │ ├── bold.svg │ │ │ ├── checklist.svg │ │ │ ├── code.svg │ │ │ ├── combine_cells.svg │ │ │ ├── delete_col.svg │ │ │ ├── delete_row.svg │ │ │ ├── delete_table.svg │ │ │ ├── github.svg │ │ │ ├── hr.svg │ │ │ ├── image.svg │ │ │ ├── images.svg │ │ │ ├── italic.svg │ │ │ ├── link.svg │ │ │ ├── mention.svg │ │ │ ├── ol.svg │ │ │ ├── paragraph.svg │ │ │ ├── quote.svg │ │ │ ├── redo.svg │ │ │ ├── remove.svg │ │ │ ├── strike.svg │ │ │ ├── table.svg │ │ │ ├── ul.svg │ │ │ ├── underline.svg │ │ │ └── undo.svg │ └── js │ │ └── app.js ├── resources │ ├── assets │ │ ├── js │ │ │ ├── app.js │ │ │ └── components │ │ │ │ ├── ImageUpload.vue │ │ │ │ └── TipTapComponent.vue │ │ └── sass │ │ │ └── app.scss │ └── views │ │ └── pages │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ ├── partials │ │ └── form.blade.php │ │ └── show.blade.php └── routes.php └── webpack.mix.js /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "extends": [ 3 | // add more generic rulesets here, such as: 4 | // 'eslint:recommended', 5 | "plugin:vue/recommended" 6 | ], 7 | "rules": { 8 | // override/add rules settings here, such as: 9 | // 'vue/no-unused-vars': 'error' 10 | "vue/max-attributes-per-line": ["error", { 11 | "singleline": 3, 12 | "multiline": { 13 | "max": 1, 14 | "allowFirstLine": false 15 | } 16 | }], 17 | "vue/html-indent": ["error", "tab", { 18 | "attribute": 1, 19 | "baseIndent": 1, 20 | "closeBracket": 0, 21 | "alignAttributesVertically": true, 22 | "ignores": [] 23 | }], 24 | "vue/no-v-html": "off" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | /node_modules/ -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | disabled: 4 | - unused_use 5 | finder: 6 | not-name: 7 | - index.php 8 | - server.php 9 | js: 10 | finder: 11 | exclude: 12 | - dist 13 | - src/public 14 | not-name: 15 | - webpack.mix.js 16 | css: true 17 | vue: true 18 | -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Appoly 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Laravel Pages 2 | 3 | Laravel pages is a package that makes creating custom pages for your web app easy! 4 | 5 | ## Installation 6 | 7 | composer require appoly/laravel-pages 8 | 9 | 10 | ## Assets 11 | 12 | To publish the packages assets run the following command. 13 | 14 | php artisan vendor:publish --tag=public --force 15 | 16 | To include the packages JS and CSS you need to add the following to the top of your layout.app file 17 | 18 | @yield('scripts') 19 | 20 | ## Config 21 | 22 | To publish the packages config file run the following command. 23 | 24 | php artisan vendor:publish --tag=laravel-pages-config --force 25 | 26 | ## How to use 27 | 28 | Once you've installed this package new routes will be created for your web app. 29 | To see all of your apps pages navigate to 30 | 31 | /admin/pages 32 | 33 | From there you can create and edit your pages. To view your pages you can navigate to 34 | 35 | /page/{slug} 36 | 37 | These routes are editable via the config file. 38 | 39 | If you are removing the `page` part from the config, place this as the last time in your routes file: 40 | 41 | `Route::get(config('laravel_pages.view_pages_route'), '\Appoly\LaravelPages\Http\Controllers\PagesController@show')->name('laravel-pages.show'); 42 | ` 43 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "appoly/laravel-pages", 3 | "description": "A CMS for laravel to easily create pages for your web application", 4 | "authors": [ 5 | { 6 | "name": "Calum", 7 | "email": "calum@appoly.co.uk" 8 | }, 9 | { 10 | "name": "James Merrix", 11 | "email": "james@appoly.co.uk" 12 | } 13 | ], 14 | "require": { 15 | "league/flysystem-aws-s3-v3": "^3.0" 16 | }, 17 | "autoload": { 18 | "psr-4": { 19 | "Appoly\\LaravelPages\\" : "src/" 20 | } 21 | }, 22 | "extra":{ 23 | "laravel": { 24 | "providers": [ 25 | "Appoly\\LaravelPages\\LaravelPagesServiceProvider" 26 | ] 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "b305e1a373097d58bdb92fd5fb4cce9d", 8 | "packages": [ 9 | { 10 | "name": "aws/aws-crt-php", 11 | "version": "v1.0.2", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/awslabs/aws-crt-php.git", 15 | "reference": "3942776a8c99209908ee0b287746263725685732" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/3942776a8c99209908ee0b287746263725685732", 20 | "reference": "3942776a8c99209908ee0b287746263725685732", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "php": ">=5.5" 25 | }, 26 | "require-dev": { 27 | "phpunit/phpunit": "^4.8.35|^5.4.3" 28 | }, 29 | "type": "library", 30 | "autoload": { 31 | "classmap": [ 32 | "src/" 33 | ] 34 | }, 35 | "notification-url": "https://packagist.org/downloads/", 36 | "license": [ 37 | "Apache-2.0" 38 | ], 39 | "authors": [ 40 | { 41 | "name": "AWS SDK Common Runtime Team", 42 | "email": "aws-sdk-common-runtime@amazon.com" 43 | } 44 | ], 45 | "description": "AWS Common Runtime for PHP", 46 | "homepage": "http://aws.amazon.com/sdkforphp", 47 | "keywords": [ 48 | "amazon", 49 | "aws", 50 | "crt", 51 | "sdk" 52 | ], 53 | "support": { 54 | "issues": "https://github.com/awslabs/aws-crt-php/issues", 55 | "source": "https://github.com/awslabs/aws-crt-php/tree/v1.0.2" 56 | }, 57 | "time": "2021-09-03T22:57:30+00:00" 58 | }, 59 | { 60 | "name": "aws/aws-sdk-php", 61 | "version": "3.222.0", 62 | "source": { 63 | "type": "git", 64 | "url": "https://github.com/aws/aws-sdk-php.git", 65 | "reference": "0074bca70bf023f049532b177bf90d3a75e425cd" 66 | }, 67 | "dist": { 68 | "type": "zip", 69 | "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/0074bca70bf023f049532b177bf90d3a75e425cd", 70 | "reference": "0074bca70bf023f049532b177bf90d3a75e425cd", 71 | "shasum": "" 72 | }, 73 | "require": { 74 | "aws/aws-crt-php": "^1.0.2", 75 | "ext-json": "*", 76 | "ext-pcre": "*", 77 | "ext-simplexml": "*", 78 | "guzzlehttp/guzzle": "^5.3.3 || ^6.2.1 || ^7.0", 79 | "guzzlehttp/promises": "^1.4.0", 80 | "guzzlehttp/psr7": "^1.7.0 || ^2.1.1", 81 | "mtdowling/jmespath.php": "^2.6", 82 | "php": ">=5.5" 83 | }, 84 | "require-dev": { 85 | "andrewsville/php-token-reflection": "^1.4", 86 | "aws/aws-php-sns-message-validator": "~1.0", 87 | "behat/behat": "~3.0", 88 | "doctrine/cache": "~1.4", 89 | "ext-dom": "*", 90 | "ext-openssl": "*", 91 | "ext-pcntl": "*", 92 | "ext-sockets": "*", 93 | "nette/neon": "^2.3", 94 | "paragonie/random_compat": ">= 2", 95 | "phpunit/phpunit": "^4.8.35 || ^5.6.3", 96 | "psr/cache": "^1.0", 97 | "psr/simple-cache": "^1.0", 98 | "sebastian/comparator": "^1.2.3" 99 | }, 100 | "suggest": { 101 | "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", 102 | "doctrine/cache": "To use the DoctrineCacheAdapter", 103 | "ext-curl": "To send requests using cURL", 104 | "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", 105 | "ext-sockets": "To use client-side monitoring" 106 | }, 107 | "type": "library", 108 | "extra": { 109 | "branch-alias": { 110 | "dev-master": "3.0-dev" 111 | } 112 | }, 113 | "autoload": { 114 | "files": [ 115 | "src/functions.php" 116 | ], 117 | "psr-4": { 118 | "Aws\\": "src/" 119 | } 120 | }, 121 | "notification-url": "https://packagist.org/downloads/", 122 | "license": [ 123 | "Apache-2.0" 124 | ], 125 | "authors": [ 126 | { 127 | "name": "Amazon Web Services", 128 | "homepage": "http://aws.amazon.com" 129 | } 130 | ], 131 | "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", 132 | "homepage": "http://aws.amazon.com/sdkforphp", 133 | "keywords": [ 134 | "amazon", 135 | "aws", 136 | "cloud", 137 | "dynamodb", 138 | "ec2", 139 | "glacier", 140 | "s3", 141 | "sdk" 142 | ], 143 | "support": { 144 | "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", 145 | "issues": "https://github.com/aws/aws-sdk-php/issues", 146 | "source": "https://github.com/aws/aws-sdk-php/tree/3.222.0" 147 | }, 148 | "time": "2022-04-27T18:36:42+00:00" 149 | }, 150 | { 151 | "name": "guzzlehttp/guzzle", 152 | "version": "7.4.2", 153 | "source": { 154 | "type": "git", 155 | "url": "https://github.com/guzzle/guzzle.git", 156 | "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" 157 | }, 158 | "dist": { 159 | "type": "zip", 160 | "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", 161 | "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", 162 | "shasum": "" 163 | }, 164 | "require": { 165 | "ext-json": "*", 166 | "guzzlehttp/promises": "^1.5", 167 | "guzzlehttp/psr7": "^1.8.3 || ^2.1", 168 | "php": "^7.2.5 || ^8.0", 169 | "psr/http-client": "^1.0", 170 | "symfony/deprecation-contracts": "^2.2 || ^3.0" 171 | }, 172 | "provide": { 173 | "psr/http-client-implementation": "1.0" 174 | }, 175 | "require-dev": { 176 | "bamarni/composer-bin-plugin": "^1.4.1", 177 | "ext-curl": "*", 178 | "php-http/client-integration-tests": "^3.0", 179 | "phpunit/phpunit": "^8.5.5 || ^9.3.5", 180 | "psr/log": "^1.1 || ^2.0 || ^3.0" 181 | }, 182 | "suggest": { 183 | "ext-curl": "Required for CURL handler support", 184 | "ext-intl": "Required for Internationalized Domain Name (IDN) support", 185 | "psr/log": "Required for using the Log middleware" 186 | }, 187 | "type": "library", 188 | "extra": { 189 | "branch-alias": { 190 | "dev-master": "7.4-dev" 191 | } 192 | }, 193 | "autoload": { 194 | "files": [ 195 | "src/functions_include.php" 196 | ], 197 | "psr-4": { 198 | "GuzzleHttp\\": "src/" 199 | } 200 | }, 201 | "notification-url": "https://packagist.org/downloads/", 202 | "license": [ 203 | "MIT" 204 | ], 205 | "authors": [ 206 | { 207 | "name": "Graham Campbell", 208 | "email": "hello@gjcampbell.co.uk", 209 | "homepage": "https://github.com/GrahamCampbell" 210 | }, 211 | { 212 | "name": "Michael Dowling", 213 | "email": "mtdowling@gmail.com", 214 | "homepage": "https://github.com/mtdowling" 215 | }, 216 | { 217 | "name": "Jeremy Lindblom", 218 | "email": "jeremeamia@gmail.com", 219 | "homepage": "https://github.com/jeremeamia" 220 | }, 221 | { 222 | "name": "George Mponos", 223 | "email": "gmponos@gmail.com", 224 | "homepage": "https://github.com/gmponos" 225 | }, 226 | { 227 | "name": "Tobias Nyholm", 228 | "email": "tobias.nyholm@gmail.com", 229 | "homepage": "https://github.com/Nyholm" 230 | }, 231 | { 232 | "name": "Márk Sági-Kazár", 233 | "email": "mark.sagikazar@gmail.com", 234 | "homepage": "https://github.com/sagikazarmark" 235 | }, 236 | { 237 | "name": "Tobias Schultze", 238 | "email": "webmaster@tubo-world.de", 239 | "homepage": "https://github.com/Tobion" 240 | } 241 | ], 242 | "description": "Guzzle is a PHP HTTP client library", 243 | "keywords": [ 244 | "client", 245 | "curl", 246 | "framework", 247 | "http", 248 | "http client", 249 | "psr-18", 250 | "psr-7", 251 | "rest", 252 | "web service" 253 | ], 254 | "support": { 255 | "issues": "https://github.com/guzzle/guzzle/issues", 256 | "source": "https://github.com/guzzle/guzzle/tree/7.4.2" 257 | }, 258 | "funding": [ 259 | { 260 | "url": "https://github.com/GrahamCampbell", 261 | "type": "github" 262 | }, 263 | { 264 | "url": "https://github.com/Nyholm", 265 | "type": "github" 266 | }, 267 | { 268 | "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", 269 | "type": "tidelift" 270 | } 271 | ], 272 | "time": "2022-03-20T14:16:28+00:00" 273 | }, 274 | { 275 | "name": "guzzlehttp/promises", 276 | "version": "1.5.1", 277 | "source": { 278 | "type": "git", 279 | "url": "https://github.com/guzzle/promises.git", 280 | "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" 281 | }, 282 | "dist": { 283 | "type": "zip", 284 | "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", 285 | "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", 286 | "shasum": "" 287 | }, 288 | "require": { 289 | "php": ">=5.5" 290 | }, 291 | "require-dev": { 292 | "symfony/phpunit-bridge": "^4.4 || ^5.1" 293 | }, 294 | "type": "library", 295 | "extra": { 296 | "branch-alias": { 297 | "dev-master": "1.5-dev" 298 | } 299 | }, 300 | "autoload": { 301 | "files": [ 302 | "src/functions_include.php" 303 | ], 304 | "psr-4": { 305 | "GuzzleHttp\\Promise\\": "src/" 306 | } 307 | }, 308 | "notification-url": "https://packagist.org/downloads/", 309 | "license": [ 310 | "MIT" 311 | ], 312 | "authors": [ 313 | { 314 | "name": "Graham Campbell", 315 | "email": "hello@gjcampbell.co.uk", 316 | "homepage": "https://github.com/GrahamCampbell" 317 | }, 318 | { 319 | "name": "Michael Dowling", 320 | "email": "mtdowling@gmail.com", 321 | "homepage": "https://github.com/mtdowling" 322 | }, 323 | { 324 | "name": "Tobias Nyholm", 325 | "email": "tobias.nyholm@gmail.com", 326 | "homepage": "https://github.com/Nyholm" 327 | }, 328 | { 329 | "name": "Tobias Schultze", 330 | "email": "webmaster@tubo-world.de", 331 | "homepage": "https://github.com/Tobion" 332 | } 333 | ], 334 | "description": "Guzzle promises library", 335 | "keywords": [ 336 | "promise" 337 | ], 338 | "support": { 339 | "issues": "https://github.com/guzzle/promises/issues", 340 | "source": "https://github.com/guzzle/promises/tree/1.5.1" 341 | }, 342 | "funding": [ 343 | { 344 | "url": "https://github.com/GrahamCampbell", 345 | "type": "github" 346 | }, 347 | { 348 | "url": "https://github.com/Nyholm", 349 | "type": "github" 350 | }, 351 | { 352 | "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", 353 | "type": "tidelift" 354 | } 355 | ], 356 | "time": "2021-10-22T20:56:57+00:00" 357 | }, 358 | { 359 | "name": "guzzlehttp/psr7", 360 | "version": "2.2.1", 361 | "source": { 362 | "type": "git", 363 | "url": "https://github.com/guzzle/psr7.git", 364 | "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" 365 | }, 366 | "dist": { 367 | "type": "zip", 368 | "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", 369 | "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", 370 | "shasum": "" 371 | }, 372 | "require": { 373 | "php": "^7.2.5 || ^8.0", 374 | "psr/http-factory": "^1.0", 375 | "psr/http-message": "^1.0", 376 | "ralouphie/getallheaders": "^3.0" 377 | }, 378 | "provide": { 379 | "psr/http-factory-implementation": "1.0", 380 | "psr/http-message-implementation": "1.0" 381 | }, 382 | "require-dev": { 383 | "bamarni/composer-bin-plugin": "^1.4.1", 384 | "http-interop/http-factory-tests": "^0.9", 385 | "phpunit/phpunit": "^8.5.8 || ^9.3.10" 386 | }, 387 | "suggest": { 388 | "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" 389 | }, 390 | "type": "library", 391 | "extra": { 392 | "branch-alias": { 393 | "dev-master": "2.2-dev" 394 | } 395 | }, 396 | "autoload": { 397 | "psr-4": { 398 | "GuzzleHttp\\Psr7\\": "src/" 399 | } 400 | }, 401 | "notification-url": "https://packagist.org/downloads/", 402 | "license": [ 403 | "MIT" 404 | ], 405 | "authors": [ 406 | { 407 | "name": "Graham Campbell", 408 | "email": "hello@gjcampbell.co.uk", 409 | "homepage": "https://github.com/GrahamCampbell" 410 | }, 411 | { 412 | "name": "Michael Dowling", 413 | "email": "mtdowling@gmail.com", 414 | "homepage": "https://github.com/mtdowling" 415 | }, 416 | { 417 | "name": "George Mponos", 418 | "email": "gmponos@gmail.com", 419 | "homepage": "https://github.com/gmponos" 420 | }, 421 | { 422 | "name": "Tobias Nyholm", 423 | "email": "tobias.nyholm@gmail.com", 424 | "homepage": "https://github.com/Nyholm" 425 | }, 426 | { 427 | "name": "Márk Sági-Kazár", 428 | "email": "mark.sagikazar@gmail.com", 429 | "homepage": "https://github.com/sagikazarmark" 430 | }, 431 | { 432 | "name": "Tobias Schultze", 433 | "email": "webmaster@tubo-world.de", 434 | "homepage": "https://github.com/Tobion" 435 | }, 436 | { 437 | "name": "Márk Sági-Kazár", 438 | "email": "mark.sagikazar@gmail.com", 439 | "homepage": "https://sagikazarmark.hu" 440 | } 441 | ], 442 | "description": "PSR-7 message implementation that also provides common utility methods", 443 | "keywords": [ 444 | "http", 445 | "message", 446 | "psr-7", 447 | "request", 448 | "response", 449 | "stream", 450 | "uri", 451 | "url" 452 | ], 453 | "support": { 454 | "issues": "https://github.com/guzzle/psr7/issues", 455 | "source": "https://github.com/guzzle/psr7/tree/2.2.1" 456 | }, 457 | "funding": [ 458 | { 459 | "url": "https://github.com/GrahamCampbell", 460 | "type": "github" 461 | }, 462 | { 463 | "url": "https://github.com/Nyholm", 464 | "type": "github" 465 | }, 466 | { 467 | "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", 468 | "type": "tidelift" 469 | } 470 | ], 471 | "time": "2022-03-20T21:55:58+00:00" 472 | }, 473 | { 474 | "name": "league/flysystem", 475 | "version": "3.0.18", 476 | "source": { 477 | "type": "git", 478 | "url": "https://github.com/thephpleague/flysystem.git", 479 | "reference": "c8e137e594948240b03372e012344b07c61b9193" 480 | }, 481 | "dist": { 482 | "type": "zip", 483 | "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/c8e137e594948240b03372e012344b07c61b9193", 484 | "reference": "c8e137e594948240b03372e012344b07c61b9193", 485 | "shasum": "" 486 | }, 487 | "require": { 488 | "league/mime-type-detection": "^1.0.0", 489 | "php": "^8.0.2" 490 | }, 491 | "conflict": { 492 | "aws/aws-sdk-php": "3.209.31 || 3.210.0", 493 | "guzzlehttp/guzzle": "<7.0", 494 | "guzzlehttp/ringphp": "<1.1.1", 495 | "symfony/http-client": "<5.2" 496 | }, 497 | "require-dev": { 498 | "async-aws/s3": "^1.5", 499 | "async-aws/simple-s3": "^1.0", 500 | "aws/aws-sdk-php": "^3.198.1", 501 | "composer/semver": "^3.0", 502 | "ext-fileinfo": "*", 503 | "ext-ftp": "*", 504 | "ext-zip": "*", 505 | "friendsofphp/php-cs-fixer": "^3.5", 506 | "google/cloud-storage": "^1.23", 507 | "microsoft/azure-storage-blob": "^1.1", 508 | "phpseclib/phpseclib": "^2.0", 509 | "phpstan/phpstan": "^0.12.26", 510 | "phpunit/phpunit": "^9.5.11", 511 | "sabre/dav": "^4.3.1" 512 | }, 513 | "type": "library", 514 | "autoload": { 515 | "psr-4": { 516 | "League\\Flysystem\\": "src" 517 | } 518 | }, 519 | "notification-url": "https://packagist.org/downloads/", 520 | "license": [ 521 | "MIT" 522 | ], 523 | "authors": [ 524 | { 525 | "name": "Frank de Jonge", 526 | "email": "info@frankdejonge.nl" 527 | } 528 | ], 529 | "description": "File storage abstraction for PHP", 530 | "keywords": [ 531 | "WebDAV", 532 | "aws", 533 | "cloud", 534 | "file", 535 | "files", 536 | "filesystem", 537 | "filesystems", 538 | "ftp", 539 | "s3", 540 | "sftp", 541 | "storage" 542 | ], 543 | "support": { 544 | "issues": "https://github.com/thephpleague/flysystem/issues", 545 | "source": "https://github.com/thephpleague/flysystem/tree/3.0.18" 546 | }, 547 | "funding": [ 548 | { 549 | "url": "https://offset.earth/frankdejonge", 550 | "type": "custom" 551 | }, 552 | { 553 | "url": "https://github.com/frankdejonge", 554 | "type": "github" 555 | }, 556 | { 557 | "url": "https://tidelift.com/funding/github/packagist/league/flysystem", 558 | "type": "tidelift" 559 | } 560 | ], 561 | "time": "2022-04-25T18:55:04+00:00" 562 | }, 563 | { 564 | "name": "league/flysystem-aws-s3-v3", 565 | "version": "3.0.13", 566 | "source": { 567 | "type": "git", 568 | "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", 569 | "reference": "0074cf016e21a6d1eb99b6db70acdd23743fc371" 570 | }, 571 | "dist": { 572 | "type": "zip", 573 | "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/0074cf016e21a6d1eb99b6db70acdd23743fc371", 574 | "reference": "0074cf016e21a6d1eb99b6db70acdd23743fc371", 575 | "shasum": "" 576 | }, 577 | "require": { 578 | "aws/aws-sdk-php": "^3.132.4", 579 | "league/flysystem": "^2.0.0 || ^3.0.0", 580 | "league/mime-type-detection": "^1.0.0", 581 | "php": "^8.0.2" 582 | }, 583 | "conflict": { 584 | "guzzlehttp/guzzle": "<7.0", 585 | "guzzlehttp/ringphp": "<1.1.1" 586 | }, 587 | "type": "library", 588 | "autoload": { 589 | "psr-4": { 590 | "League\\Flysystem\\AwsS3V3\\": "" 591 | } 592 | }, 593 | "notification-url": "https://packagist.org/downloads/", 594 | "license": [ 595 | "MIT" 596 | ], 597 | "authors": [ 598 | { 599 | "name": "Frank de Jonge", 600 | "email": "info@frankdejonge.nl" 601 | } 602 | ], 603 | "description": "AWS S3 filesystem adapter for Flysystem.", 604 | "keywords": [ 605 | "Flysystem", 606 | "aws", 607 | "file", 608 | "files", 609 | "filesystem", 610 | "s3", 611 | "storage" 612 | ], 613 | "support": { 614 | "issues": "https://github.com/thephpleague/flysystem-aws-s3-v3/issues", 615 | "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.0.13" 616 | }, 617 | "time": "2022-04-01T22:05:11+00:00" 618 | }, 619 | { 620 | "name": "league/mime-type-detection", 621 | "version": "1.11.0", 622 | "source": { 623 | "type": "git", 624 | "url": "https://github.com/thephpleague/mime-type-detection.git", 625 | "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" 626 | }, 627 | "dist": { 628 | "type": "zip", 629 | "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", 630 | "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", 631 | "shasum": "" 632 | }, 633 | "require": { 634 | "ext-fileinfo": "*", 635 | "php": "^7.2 || ^8.0" 636 | }, 637 | "require-dev": { 638 | "friendsofphp/php-cs-fixer": "^3.2", 639 | "phpstan/phpstan": "^0.12.68", 640 | "phpunit/phpunit": "^8.5.8 || ^9.3" 641 | }, 642 | "type": "library", 643 | "autoload": { 644 | "psr-4": { 645 | "League\\MimeTypeDetection\\": "src" 646 | } 647 | }, 648 | "notification-url": "https://packagist.org/downloads/", 649 | "license": [ 650 | "MIT" 651 | ], 652 | "authors": [ 653 | { 654 | "name": "Frank de Jonge", 655 | "email": "info@frankdejonge.nl" 656 | } 657 | ], 658 | "description": "Mime-type detection for Flysystem", 659 | "support": { 660 | "issues": "https://github.com/thephpleague/mime-type-detection/issues", 661 | "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" 662 | }, 663 | "funding": [ 664 | { 665 | "url": "https://github.com/frankdejonge", 666 | "type": "github" 667 | }, 668 | { 669 | "url": "https://tidelift.com/funding/github/packagist/league/flysystem", 670 | "type": "tidelift" 671 | } 672 | ], 673 | "time": "2022-04-17T13:12:02+00:00" 674 | }, 675 | { 676 | "name": "mtdowling/jmespath.php", 677 | "version": "2.6.1", 678 | "source": { 679 | "type": "git", 680 | "url": "https://github.com/jmespath/jmespath.php.git", 681 | "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb" 682 | }, 683 | "dist": { 684 | "type": "zip", 685 | "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/9b87907a81b87bc76d19a7fb2d61e61486ee9edb", 686 | "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb", 687 | "shasum": "" 688 | }, 689 | "require": { 690 | "php": "^5.4 || ^7.0 || ^8.0", 691 | "symfony/polyfill-mbstring": "^1.17" 692 | }, 693 | "require-dev": { 694 | "composer/xdebug-handler": "^1.4 || ^2.0", 695 | "phpunit/phpunit": "^4.8.36 || ^7.5.15" 696 | }, 697 | "bin": [ 698 | "bin/jp.php" 699 | ], 700 | "type": "library", 701 | "extra": { 702 | "branch-alias": { 703 | "dev-master": "2.6-dev" 704 | } 705 | }, 706 | "autoload": { 707 | "files": [ 708 | "src/JmesPath.php" 709 | ], 710 | "psr-4": { 711 | "JmesPath\\": "src/" 712 | } 713 | }, 714 | "notification-url": "https://packagist.org/downloads/", 715 | "license": [ 716 | "MIT" 717 | ], 718 | "authors": [ 719 | { 720 | "name": "Michael Dowling", 721 | "email": "mtdowling@gmail.com", 722 | "homepage": "https://github.com/mtdowling" 723 | } 724 | ], 725 | "description": "Declaratively specify how to extract elements from a JSON document", 726 | "keywords": [ 727 | "json", 728 | "jsonpath" 729 | ], 730 | "support": { 731 | "issues": "https://github.com/jmespath/jmespath.php/issues", 732 | "source": "https://github.com/jmespath/jmespath.php/tree/2.6.1" 733 | }, 734 | "time": "2021-06-14T00:11:39+00:00" 735 | }, 736 | { 737 | "name": "psr/http-client", 738 | "version": "1.0.1", 739 | "source": { 740 | "type": "git", 741 | "url": "https://github.com/php-fig/http-client.git", 742 | "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" 743 | }, 744 | "dist": { 745 | "type": "zip", 746 | "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", 747 | "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", 748 | "shasum": "" 749 | }, 750 | "require": { 751 | "php": "^7.0 || ^8.0", 752 | "psr/http-message": "^1.0" 753 | }, 754 | "type": "library", 755 | "extra": { 756 | "branch-alias": { 757 | "dev-master": "1.0.x-dev" 758 | } 759 | }, 760 | "autoload": { 761 | "psr-4": { 762 | "Psr\\Http\\Client\\": "src/" 763 | } 764 | }, 765 | "notification-url": "https://packagist.org/downloads/", 766 | "license": [ 767 | "MIT" 768 | ], 769 | "authors": [ 770 | { 771 | "name": "PHP-FIG", 772 | "homepage": "http://www.php-fig.org/" 773 | } 774 | ], 775 | "description": "Common interface for HTTP clients", 776 | "homepage": "https://github.com/php-fig/http-client", 777 | "keywords": [ 778 | "http", 779 | "http-client", 780 | "psr", 781 | "psr-18" 782 | ], 783 | "support": { 784 | "source": "https://github.com/php-fig/http-client/tree/master" 785 | }, 786 | "time": "2020-06-29T06:28:15+00:00" 787 | }, 788 | { 789 | "name": "psr/http-factory", 790 | "version": "1.0.1", 791 | "source": { 792 | "type": "git", 793 | "url": "https://github.com/php-fig/http-factory.git", 794 | "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" 795 | }, 796 | "dist": { 797 | "type": "zip", 798 | "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", 799 | "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", 800 | "shasum": "" 801 | }, 802 | "require": { 803 | "php": ">=7.0.0", 804 | "psr/http-message": "^1.0" 805 | }, 806 | "type": "library", 807 | "extra": { 808 | "branch-alias": { 809 | "dev-master": "1.0.x-dev" 810 | } 811 | }, 812 | "autoload": { 813 | "psr-4": { 814 | "Psr\\Http\\Message\\": "src/" 815 | } 816 | }, 817 | "notification-url": "https://packagist.org/downloads/", 818 | "license": [ 819 | "MIT" 820 | ], 821 | "authors": [ 822 | { 823 | "name": "PHP-FIG", 824 | "homepage": "http://www.php-fig.org/" 825 | } 826 | ], 827 | "description": "Common interfaces for PSR-7 HTTP message factories", 828 | "keywords": [ 829 | "factory", 830 | "http", 831 | "message", 832 | "psr", 833 | "psr-17", 834 | "psr-7", 835 | "request", 836 | "response" 837 | ], 838 | "support": { 839 | "source": "https://github.com/php-fig/http-factory/tree/master" 840 | }, 841 | "time": "2019-04-30T12:38:16+00:00" 842 | }, 843 | { 844 | "name": "psr/http-message", 845 | "version": "1.0.1", 846 | "source": { 847 | "type": "git", 848 | "url": "https://github.com/php-fig/http-message.git", 849 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" 850 | }, 851 | "dist": { 852 | "type": "zip", 853 | "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", 854 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", 855 | "shasum": "" 856 | }, 857 | "require": { 858 | "php": ">=5.3.0" 859 | }, 860 | "type": "library", 861 | "extra": { 862 | "branch-alias": { 863 | "dev-master": "1.0.x-dev" 864 | } 865 | }, 866 | "autoload": { 867 | "psr-4": { 868 | "Psr\\Http\\Message\\": "src/" 869 | } 870 | }, 871 | "notification-url": "https://packagist.org/downloads/", 872 | "license": [ 873 | "MIT" 874 | ], 875 | "authors": [ 876 | { 877 | "name": "PHP-FIG", 878 | "homepage": "http://www.php-fig.org/" 879 | } 880 | ], 881 | "description": "Common interface for HTTP messages", 882 | "homepage": "https://github.com/php-fig/http-message", 883 | "keywords": [ 884 | "http", 885 | "http-message", 886 | "psr", 887 | "psr-7", 888 | "request", 889 | "response" 890 | ], 891 | "support": { 892 | "source": "https://github.com/php-fig/http-message/tree/master" 893 | }, 894 | "time": "2016-08-06T14:39:51+00:00" 895 | }, 896 | { 897 | "name": "ralouphie/getallheaders", 898 | "version": "3.0.3", 899 | "source": { 900 | "type": "git", 901 | "url": "https://github.com/ralouphie/getallheaders.git", 902 | "reference": "120b605dfeb996808c31b6477290a714d356e822" 903 | }, 904 | "dist": { 905 | "type": "zip", 906 | "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", 907 | "reference": "120b605dfeb996808c31b6477290a714d356e822", 908 | "shasum": "" 909 | }, 910 | "require": { 911 | "php": ">=5.6" 912 | }, 913 | "require-dev": { 914 | "php-coveralls/php-coveralls": "^2.1", 915 | "phpunit/phpunit": "^5 || ^6.5" 916 | }, 917 | "type": "library", 918 | "autoload": { 919 | "files": [ 920 | "src/getallheaders.php" 921 | ] 922 | }, 923 | "notification-url": "https://packagist.org/downloads/", 924 | "license": [ 925 | "MIT" 926 | ], 927 | "authors": [ 928 | { 929 | "name": "Ralph Khattar", 930 | "email": "ralph.khattar@gmail.com" 931 | } 932 | ], 933 | "description": "A polyfill for getallheaders.", 934 | "support": { 935 | "issues": "https://github.com/ralouphie/getallheaders/issues", 936 | "source": "https://github.com/ralouphie/getallheaders/tree/develop" 937 | }, 938 | "time": "2019-03-08T08:55:37+00:00" 939 | }, 940 | { 941 | "name": "symfony/deprecation-contracts", 942 | "version": "v3.0.1", 943 | "source": { 944 | "type": "git", 945 | "url": "https://github.com/symfony/deprecation-contracts.git", 946 | "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" 947 | }, 948 | "dist": { 949 | "type": "zip", 950 | "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", 951 | "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", 952 | "shasum": "" 953 | }, 954 | "require": { 955 | "php": ">=8.0.2" 956 | }, 957 | "type": "library", 958 | "extra": { 959 | "branch-alias": { 960 | "dev-main": "3.0-dev" 961 | }, 962 | "thanks": { 963 | "name": "symfony/contracts", 964 | "url": "https://github.com/symfony/contracts" 965 | } 966 | }, 967 | "autoload": { 968 | "files": [ 969 | "function.php" 970 | ] 971 | }, 972 | "notification-url": "https://packagist.org/downloads/", 973 | "license": [ 974 | "MIT" 975 | ], 976 | "authors": [ 977 | { 978 | "name": "Nicolas Grekas", 979 | "email": "p@tchwork.com" 980 | }, 981 | { 982 | "name": "Symfony Community", 983 | "homepage": "https://symfony.com/contributors" 984 | } 985 | ], 986 | "description": "A generic function and convention to trigger deprecation notices", 987 | "homepage": "https://symfony.com", 988 | "support": { 989 | "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.1" 990 | }, 991 | "funding": [ 992 | { 993 | "url": "https://symfony.com/sponsor", 994 | "type": "custom" 995 | }, 996 | { 997 | "url": "https://github.com/fabpot", 998 | "type": "github" 999 | }, 1000 | { 1001 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1002 | "type": "tidelift" 1003 | } 1004 | ], 1005 | "time": "2022-01-02T09:55:41+00:00" 1006 | }, 1007 | { 1008 | "name": "symfony/polyfill-mbstring", 1009 | "version": "v1.25.0", 1010 | "source": { 1011 | "type": "git", 1012 | "url": "https://github.com/symfony/polyfill-mbstring.git", 1013 | "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" 1014 | }, 1015 | "dist": { 1016 | "type": "zip", 1017 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", 1018 | "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", 1019 | "shasum": "" 1020 | }, 1021 | "require": { 1022 | "php": ">=7.1" 1023 | }, 1024 | "provide": { 1025 | "ext-mbstring": "*" 1026 | }, 1027 | "suggest": { 1028 | "ext-mbstring": "For best performance" 1029 | }, 1030 | "type": "library", 1031 | "extra": { 1032 | "branch-alias": { 1033 | "dev-main": "1.23-dev" 1034 | }, 1035 | "thanks": { 1036 | "name": "symfony/polyfill", 1037 | "url": "https://github.com/symfony/polyfill" 1038 | } 1039 | }, 1040 | "autoload": { 1041 | "files": [ 1042 | "bootstrap.php" 1043 | ], 1044 | "psr-4": { 1045 | "Symfony\\Polyfill\\Mbstring\\": "" 1046 | } 1047 | }, 1048 | "notification-url": "https://packagist.org/downloads/", 1049 | "license": [ 1050 | "MIT" 1051 | ], 1052 | "authors": [ 1053 | { 1054 | "name": "Nicolas Grekas", 1055 | "email": "p@tchwork.com" 1056 | }, 1057 | { 1058 | "name": "Symfony Community", 1059 | "homepage": "https://symfony.com/contributors" 1060 | } 1061 | ], 1062 | "description": "Symfony polyfill for the Mbstring extension", 1063 | "homepage": "https://symfony.com", 1064 | "keywords": [ 1065 | "compatibility", 1066 | "mbstring", 1067 | "polyfill", 1068 | "portable", 1069 | "shim" 1070 | ], 1071 | "support": { 1072 | "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" 1073 | }, 1074 | "funding": [ 1075 | { 1076 | "url": "https://symfony.com/sponsor", 1077 | "type": "custom" 1078 | }, 1079 | { 1080 | "url": "https://github.com/fabpot", 1081 | "type": "github" 1082 | }, 1083 | { 1084 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1085 | "type": "tidelift" 1086 | } 1087 | ], 1088 | "time": "2021-11-30T18:21:41+00:00" 1089 | } 1090 | ], 1091 | "packages-dev": [], 1092 | "aliases": [], 1093 | "minimum-stability": "stable", 1094 | "stability-flags": [], 1095 | "prefer-stable": false, 1096 | "prefer-lowest": false, 1097 | "platform": [], 1098 | "platform-dev": [], 1099 | "plugin-api-version": "2.2.0" 1100 | } 1101 | -------------------------------------------------------------------------------- /config/laravel_pages.php: -------------------------------------------------------------------------------- 1 | '/admin/pages', 16 | 'admin_route_prefix' => 'admin.', 17 | 'admin_middle_ware' => ['web', 'auth'], 18 | 'view_pages_route' => '/page/{slug}', 19 | 'disable_show_route' => false, 20 | 'disable_header_image' => false, 21 | 'disable_page_url' => false, 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Editor 26 | |-------------------------------------------------------------------------- 27 | | 28 | | Here you may specify which editor your pages form should use. 29 | | 30 | | Supported: "textarea", "tiptap" 31 | | 32 | */ 33 | 34 | 'editor' => 'tiptap', 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Layout 39 | |-------------------------------------------------------------------------- 40 | | 41 | | Here you can define the layout file you would like to use for your pages. 42 | | 43 | | 44 | | 45 | */ 46 | 47 | 'layout_file' => 'layouts.app', 48 | 'layout_file_frontend' => 'layouts.frontend', 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | View 53 | |-------------------------------------------------------------------------- 54 | | 55 | | Here you can define a custom view for your pages. 56 | | When creating your view the page will come through as $page 57 | | Keep blank to use the default 58 | | 59 | */ 60 | 61 | 'custom_view' => '', 62 | 63 | /* 64 | |-------------------------------------------------------------------------- 65 | | S3 66 | |-------------------------------------------------------------------------- 67 | | 68 | | Here you can define your s3 details for image uploads 69 | | without these details images will not be available 70 | | 71 | | 72 | */ 73 | 74 | 'AWS_ACCESS_KEY_ID' => env('AWS_ACCESS_KEY_ID', ''), 75 | 76 | 'AWS_SECRET_ACCESS_KEY'=> env('AWS_SECRET_ACCESS_KEY', ''), 77 | 78 | 'AWS_DEFAULT_REGION'=>env('AWS_DEFAULT_REGION', 'us-east-1'), 79 | 80 | 'AWS_BUCKET' => env('AWS_BUCKET', ''), 81 | 82 | /* 83 | |-------------------------------------------------------------------------- 84 | | Partials 85 | |-------------------------------------------------------------------------- 86 | | 87 | | Here you can include an array of partials that you would like 88 | | included on you page. An example can be seen below 89 | | 'partials' => [ 90 | | [ 91 | | 'name' => 'Contact Form', 92 | | 'location' => 'partials.contact-form' 93 | | ] 94 | | ] 95 | | WARNING: ALTERING THESE AFTER PRODUCTION WILL CAUSE ERRORS 96 | */ 97 | 98 | 'partials' => [ 99 | 100 | ], 101 | 102 | ]; 103 | -------------------------------------------------------------------------------- /mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/src/public/js/app.js": "/src/public/js/app.js", 3 | "/src/public/css/app.css": "/src/public/css/app.css" 4 | } 5 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 11 | "lint": "eslint --ext .js,.vue src/resources", 12 | "lint:fix": "eslint --ext .js,.vue src/resources --fix" 13 | }, 14 | "devDependencies": { 15 | "axios": "^0.19", 16 | "browser-sync": "^2.23.6", 17 | "browser-sync-webpack-plugin": "^2.0.1", 18 | "cross-env": "^7.0", 19 | "eslint": "^6.8.0", 20 | "eslint-plugin-vue": "^6.2.2", 21 | "js-yaml": ">=3.13.1", 22 | "laravel-mix": "^5.0.4", 23 | "lodash": "^4.17.4", 24 | "mem": "^6.1.0", 25 | "popper.js": "^1.16.1", 26 | "resolve-url-loader": "^3.1.1", 27 | "sass": "^1.26.5", 28 | "sass-loader": "^8.0.2", 29 | "vue": "^2.6.11", 30 | "vue-template-compiler": "^2.6.11", 31 | "webpack-dev-server": "^3.11.0" 32 | }, 33 | "dependencies": { 34 | "sweetalert2": "^9.10.13", 35 | "tiptap": "^1.27.1", 36 | "tiptap-extensions": "^1.29.1", 37 | "vue2-dropzone": "^3.6.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Http/Controllers/PagesController.php: -------------------------------------------------------------------------------- 1 | file('header_image')) { 43 | $location = 'laravel_pages/images'; 44 | $data['file'] = $files->store($location, 's3'); 45 | Storage::disk('s3')->setVisibility($data['file'], 'public'); 46 | $request->merge(['header_image' => $data['file']]); 47 | } 48 | 49 | $page = Page::create($request->all()); 50 | 51 | return redirect()->route('laravel-pages.show', $page->slug); 52 | } 53 | 54 | /** 55 | * Display the specified resource. 56 | * 57 | * @param $slug 58 | * @return \Illuminate\Http\Response 59 | */ 60 | public function show($slug) 61 | { 62 | $page = Page::where('slug', $slug)->first(); 63 | if (! $page) { 64 | abort(404, 'Page not found.'); 65 | } 66 | $page->increment('views'); 67 | 68 | if (config('laravel_pages.custom_view') !== '') { 69 | return view(config('laravel_pages.custom_view'), compact('page')); 70 | } 71 | 72 | return view('laravel-pages::pages.show', compact('page')); 73 | } 74 | 75 | /** 76 | * Show the form for editing the specified resource. 77 | * 78 | * @param \App\Page $page 79 | * @return \Illuminate\Http\Response 80 | */ 81 | public function edit($id) 82 | { 83 | $page = Page::find($id); 84 | 85 | return view('laravel-pages::pages.edit', compact('page')); 86 | } 87 | 88 | /** 89 | * Update the specified resource in storage. 90 | * 91 | * @param \Illuminate\Http\Request $request 92 | * @param \App\Page $page 93 | * @return \Illuminate\Http\Response 94 | */ 95 | public function update(Request $request, $id) 96 | { 97 | $page = Page::find($id); 98 | $page->update($request->all()); 99 | 100 | return redirect()->route('laravel-pages.show', $page->slug); 101 | } 102 | 103 | /** 104 | * Remove the specified resource from storage. 105 | * 106 | * @param \App\Page $page 107 | * @return \Illuminate\Http\Response 108 | */ 109 | public function destroy($id) 110 | { 111 | $page = Page::find($id); 112 | $page->delete(); 113 | 114 | return redirect()->route('admin.pages.index')->with('success', 'Page has been deleted.'); 115 | } 116 | 117 | public function imageUpload(Request $request) 118 | { 119 | if ($files = $request->file('file')) { 120 | $location = 'laravel_pages/images'; 121 | $data['file'] = $files->store($location, 's3'); 122 | Storage::disk('s3')->setVisibility($data['file'], 'public'); 123 | } 124 | 125 | return env('AWS_URL').$data['file']; 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /src/LaravelPagesServiceProvider.php: -------------------------------------------------------------------------------- 1 | publishes([ 18 | __DIR__.'/public' => public_path('vendor/appoly/laravel-pages'), 19 | ], 'public'); 20 | 21 | $this->publishes([ 22 | __DIR__.'/../config/laravel_pages.php' => config_path('laravel_pages.php'), 23 | ], 'laravel-pages-config'); 24 | 25 | $this->loadRoutesFrom(__DIR__.'/routes.php'); 26 | $this->loadMigrationsFrom(__DIR__.'/Migrations'); 27 | $this->loadViewsFrom(__DIR__.'/resources/views', 'laravel-pages'); 28 | } 29 | 30 | /** 31 | * Make config publishment optional by merging the config from the package. 32 | * 33 | * @return void 34 | */ 35 | public function register() 36 | { 37 | $this->mergeConfigFrom( 38 | __DIR__.'/../config/laravel_pages.php', 39 | 'laravel_pages' 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Migrations/0000_00_00_000000_create_pages_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('title'); 19 | $table->text('keywords')->nullable(); 20 | $table->text('description')->nullable(); 21 | $table->text('body'); 22 | $table->string('slug')->index(); 23 | $table->integer('views')->nullable(); 24 | $table->string('header_image')->nullable(); 25 | $table->integer('partial')->nullable(); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('pages'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Models/Page.php: -------------------------------------------------------------------------------- 1 | :first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.swal2-container .swal2-modal{margin:0!important}}.swal2-container.swal2-shown{background-color:rgba(0,0,0,.4)}.swal2-popup{display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:.3125em;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:flex;flex-direction:column;align-items:center}.swal2-title{position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-actions.swal2-loading .swal2-styled.swal2-confirm{box-sizing:border-box;width:2.5em;height:2.5em;margin:.46875em;padding:0;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-radius:100%;border:.25em solid transparent;background-color:transparent!important;color:transparent;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-actions.swal2-loading .swal2-styled.swal2-cancel{margin-right:30px;margin-left:30px}.swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm:after{content:"";display:inline-block;width:15px;height:15px;margin-left:5px;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-radius:50%;border:3px solid #999;border-right-color:transparent;box-shadow:1px 1px 1px #fff}.swal2-styled{margin:.3125em;padding:.625em 2em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{background:initial;background-color:#3085d6}.swal2-styled.swal2-cancel,.swal2-styled.swal2-confirm{border:0;border-radius:.25em;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{background:initial;background-color:#aaa}.swal2-styled:focus{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px rgba(50,100,150,.4)}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:0;outline:initial;background:transparent;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{transform:none;background:transparent;color:#f27474}.swal2-content{z-index:1;justify-content:center;margin:0;padding:0;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:0 0 3px #c4e6f5}.swal2-file::-webkit-input-placeholder,.swal2-input::-webkit-input-placeholder,.swal2-textarea::-webkit-input-placeholder{color:#ccc}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::-ms-input-placeholder,.swal2-input::-ms-input-placeholder,.swal2-textarea::-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:inherit}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:inherit;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{margin:0 .4em}.swal2-validation-message{display:none;align-items:center;justify-content:center;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message:before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon:before{display:flex;align-items:center;height:92%;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning:before{content:"!"}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info:before{content:"i"}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question:before{content:"?"}.swal2-icon.swal2-question.swal2-arabic-question-mark:before{content:"\61F"}.swal2-icon.swal2-success{border-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.875em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-progress-steps{align-items:center;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;width:2em;height:2em;border-radius:2em;background:#3085d6;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#3085d6}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;width:2.5em;height:.4em;margin:0 -1px;background:#3085d6}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-show.swal2-noanimation{-webkit-animation:none;animation:none}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-hide.swal2-noanimation{-webkit-animation:none;animation:none}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-animate-success-icon .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-animate-success-icon .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-animate-success-icon .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-animate-error-icon{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-animate-error-icon .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-moz-document url-prefix(){.swal2-close:focus{outline:2px solid rgba(50,100,150,.4)}}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotate(2deg)}33%{transform:translateY(0) rotate(-2deg)}66%{transform:translateY(.3125em) rotate(2deg)}to{transform:translateY(0) rotate(0deg)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotate(2deg)}33%{transform:translateY(0) rotate(-2deg)}66%{transform:translateY(.3125em) rotate(2deg)}to{transform:translateY(0) rotate(0deg)}}@-webkit-keyframes swal2-toast-hide{to{transform:rotate(1deg);opacity:0}}@keyframes swal2-toast-hide{to{transform:rotate(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}to{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}to{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}to{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}to{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}to{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}to{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}to{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}to{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}to{top:2.8125em;left:.875em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}to{top:2.8125em;left:.875em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}to{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}to{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}to{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}to{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}to{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}to{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}to{transform:rotateX(0deg);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}to{transform:rotateX(0deg);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-shown{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - 1.25em);background-color:transparent}body.swal2-no-backdrop .swal2-shown>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-shown.swal2-top{top:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-top-left,body.swal2-no-backdrop .swal2-shown.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-shown.swal2-top-end,body.swal2-no-backdrop .swal2-shown.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-shown.swal2-center{top:50%;left:50%;transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-shown.swal2-center-left,body.swal2-no-backdrop .swal2-shown.swal2-center-start{top:50%;left:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-center-end,body.swal2-no-backdrop .swal2-shown.swal2-center-right{top:50%;right:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-bottom{bottom:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-bottom-left,body.swal2-no-backdrop .swal2-shown.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-shown.swal2-bottom-end,body.swal2-no-backdrop .swal2-shown.swal2-bottom-right{right:0;bottom:0}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container,body.swal2-toast-shown .swal2-container.swal2-shown{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}body.swal2-toast-column .swal2-toast{flex-direction:column;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validation-message{font-size:1em}.wysiwyg-editor .menubar{margin-top:15px;margin-bottom:5px}.wysiwyg-editor .menubar a{-webkit-appearance:none;background:none;border-radius:10px;border:0;padding:5px 10px;color:#000;display:inline-block}.wysiwyg-editor .menubar a:hover{background:rgba(0,0,0,.5)}.wysiwyg-editor .menubar a img{height:16px}.wysiwyg-editor .ProseMirror{color:#000;background:rgba(0,0,0,.03);box-shadow:0 15px 21px -1px rgba(0,0,0,.004);padding:20px;border-radius:13px;min-height:20rem} -------------------------------------------------------------------------------- /src/public/img/wysiwyg/add_col_after.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/add_col_before.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/add_row_after.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/add_row_before.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/bold.svg: -------------------------------------------------------------------------------- 1 | text-bold 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/checklist.svg: -------------------------------------------------------------------------------- 1 | checklist-alternate 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/code.svg: -------------------------------------------------------------------------------- 1 | angle-brackets 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/combine_cells.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/delete_col.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/delete_row.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/delete_table.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/github.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/hr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/image.svg: -------------------------------------------------------------------------------- 1 | paginate-filter-picture-alternate 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/images.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/italic.svg: -------------------------------------------------------------------------------- 1 | text-italic 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/link.svg: -------------------------------------------------------------------------------- 1 | hyperlink-2 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/mention.svg: -------------------------------------------------------------------------------- 1 | read-email-at-alternate -------------------------------------------------------------------------------- /src/public/img/wysiwyg/ol.svg: -------------------------------------------------------------------------------- 1 | list-numbers 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/paragraph.svg: -------------------------------------------------------------------------------- 1 | paragraph 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/quote.svg: -------------------------------------------------------------------------------- 1 | close-quote 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/redo.svg: -------------------------------------------------------------------------------- 1 | redo 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/remove.svg: -------------------------------------------------------------------------------- 1 | delete-2-alternate 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/strike.svg: -------------------------------------------------------------------------------- 1 | text-strike-through 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/table.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/ul.svg: -------------------------------------------------------------------------------- 1 | list-bullets 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/underline.svg: -------------------------------------------------------------------------------- 1 | text-underline 2 | -------------------------------------------------------------------------------- /src/public/img/wysiwyg/undo.svg: -------------------------------------------------------------------------------- 1 | undo 2 | -------------------------------------------------------------------------------- /src/resources/assets/js/app.js: -------------------------------------------------------------------------------- 1 | window.swal = require('sweetalert2'); 2 | 3 | window.Vue = require('vue'); 4 | 5 | Vue.component('page-body-editor', require('./components/TipTapComponent.vue').default); 6 | 7 | const app = new Vue({ 8 | el: '#app', 9 | }); 10 | 11 | //Generate slug from title 12 | //TODO make a request to check if it's unique 13 | $('input#title').change(function () { 14 | var urlInput = $('input#slug'); 15 | if (urlInput.val() == '') { 16 | urlInput.val( 17 | $(this) 18 | .val() 19 | .toLowerCase() 20 | .replace(/ /g, '-') 21 | .replace(/[^\w-]+/g, '') 22 | ); 23 | } 24 | }); 25 | 26 | $('input[type="file"]').on('change', function (e) { 27 | var fileName = e.target.files[0].name; 28 | $('.custom-file-label').text(fileName); 29 | }); 30 | -------------------------------------------------------------------------------- /src/resources/assets/js/components/ImageUpload.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 110 | 111 | 190 | -------------------------------------------------------------------------------- /src/resources/assets/js/components/TipTapComponent.vue: -------------------------------------------------------------------------------- 1 | 125 | 225 | -------------------------------------------------------------------------------- /src/resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | // SweetAlert2 2 | @import '~sweetalert2/src/sweetalert2.scss'; 3 | 4 | .wysiwyg-editor { 5 | .menubar { 6 | margin-top: 15px; 7 | margin-bottom: 5px; 8 | 9 | a { 10 | -webkit-appearance: none; 11 | background: none; 12 | border-radius: 10px; 13 | border: 0; 14 | padding: 5px 10px; 15 | color: black; 16 | display: inline-block; 17 | 18 | &:hover { 19 | background: rgba(0, 0, 0, 0.5); 20 | } 21 | 22 | img { 23 | height: 16px; 24 | } 25 | } 26 | } 27 | .ProseMirror { 28 | color: black; 29 | background: rgba(0, 0, 0, 0.03); 30 | box-shadow: 0px 15px 21px -1px rgba(0, 0, 0, 0.004); 31 | padding: 20px; 32 | border-radius: 13px; 33 | min-height: 20rem; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/resources/views/pages/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends(config('laravel_pages.layout_file')) 2 | 3 | @section('scripts') 4 | 5 | 6 | @endsection 7 | 8 | @section('content') 9 |
10 |
11 |
12 | Create a new page 13 |
14 |
15 | 16 |
18 | @csrf 19 | @include('laravel-pages::pages.partials.form') 20 |
21 |
22 |
23 |
24 | 25 | @endsection 26 | -------------------------------------------------------------------------------- /src/resources/views/pages/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends(config('laravel_pages.layout_file')) 2 | 3 | @section('scripts') 4 | 5 | 6 | @endsection 7 | 8 | @section('content') 9 |
10 |
11 |
12 | 13 |
15 | @csrf 16 | @method('PATCH') 17 | @include('laravel-pages::pages.partials.form') 18 |
19 |
20 |
21 |
22 | 23 | @endsection 24 | -------------------------------------------------------------------------------- /src/resources/views/pages/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends(config('laravel_pages.layout_file')) 2 | 3 | @section('content') 4 | 5 |
6 | 7 |
8 |
9 |
10 | Create 11 |
12 |

Pages

13 |
14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | @foreach ($pages as $page) 27 | 28 | 29 | 32 | 35 | 53 | 54 | @endforeach 55 | 56 | 57 |
Page TitleURLViewsActions
{{ $page->title }} 30 | {{ route('laravel-pages.show', $page->slug) }} 31 | 33 | {{ $page->views }} 34 | 36 | 37 | 41 | 51 | 52 |
58 |
59 |
60 |
61 | 62 | @endsection -------------------------------------------------------------------------------- /src/resources/views/pages/partials/form.blade.php: -------------------------------------------------------------------------------- 1 | @if(!config('laravel_pages.disable_header_image')) 2 |
3 |
4 |
5 | 6 | 7 |
8 |
9 |
10 | @endif 11 | 12 |
13 |
14 | 15 | 16 |
17 | @if(!config('laravel_pages.disable_page_url')) 18 |
19 | 20 |
21 |
22 |
{{ URL::to('/') }}/
23 |
24 | 25 |
26 |
27 | @endif 28 |
29 | 30 | @switch(config('laravel_pages.editor')) 31 | @case('tiptap') 32 | 33 | @break 34 | @default 35 | 36 | 37 | @endswitch 38 | 39 | @if (!empty(config('laravel_pages.partials'))) 40 |
41 | 42 | 48 |
49 | 50 | 51 | @endif 52 | 53 | 54 |
55 | Cancel 56 | 57 |
58 | -------------------------------------------------------------------------------- /src/resources/views/pages/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends(config('laravel_pages.layout_file_frontend')) 2 | 3 | @section('content') 4 | 5 |
6 |
7 |
8 |

{{ $page->title }}

9 |
10 | 11 | @if (isset($page->header_image)) 12 |
13 | 14 |
15 | @endif 16 | 17 | {!! $page->body !!} 18 | 19 | @if (isset($page->partial)) 20 | @include(config('laravel_pages.partials.'. $page->partial .'.location')) 21 | @endif 22 |
23 |
24 | 25 | @endsection -------------------------------------------------------------------------------- /src/routes.php: -------------------------------------------------------------------------------- 1 | name(config('laravel_pages.admin_route_prefix'))->group(function () { 8 | Route::resource(config('laravel_pages.admin_pages_route'), 'Appoly\LaravelPages\Http\Controllers\PagesController')->except('show'); 9 | }); 10 | 11 | if (! config('laravel_pages.disable_show_route')) { 12 | Route::get(config('laravel_pages.view_pages_route'), 'Appoly\LaravelPages\Http\Controllers\PagesController@show')->name('laravel-pages.show'); 13 | } 14 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | let mix = require('laravel-mix'); 2 | 3 | mix.js('src/resources/assets/js/app.js', 'src/public/js') 4 | .sass('src/resources/assets/sass/app.scss', 'src/public/css'); --------------------------------------------------------------------------------