├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── .vercelignore ├── LICENSE ├── README.md ├── api └── index.php ├── app ├── Http │ └── Controllers │ │ └── Controller.php ├── Models │ └── User.php └── Providers │ └── AppServiceProvider.php ├── artisan ├── bootstrap ├── app.php ├── cache │ └── .gitignore └── providers.php ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── cache.php ├── database.php ├── filesystems.php ├── logging.php ├── mail.php ├── queue.php ├── services.php └── session.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 0001_01_01_000000_create_users_table.php │ ├── 0001_01_01_000001_create_cache_table.php │ └── 0001_01_01_000002_create_jobs_table.php └── seeders │ └── DatabaseSeeder.php ├── package.json ├── phpunit.xml ├── platform ├── dashboard.json ├── module │ └── WebsiteBuilder │ │ ├── .gitignore │ │ ├── Tests │ │ ├── Feature │ │ │ └── .gitkeep │ │ └── Unit │ │ │ └── .gitkeep │ │ ├── composer.json │ │ ├── config │ │ ├── .gitkeep │ │ └── websitebuilder.php │ │ ├── database │ │ ├── factories │ │ │ └── .gitkeep │ │ ├── migrations │ │ │ └── .gitkeep │ │ └── seeders │ │ │ └── .gitkeep │ │ ├── helpers │ │ ├── .gitkeep │ │ ├── constraint.php │ │ └── function.php │ │ ├── module.json │ │ ├── package.json │ │ ├── public │ │ ├── .gitkeep │ │ └── index.html │ │ ├── resources │ │ ├── .gitkeep │ │ ├── js │ │ │ └── app.js │ │ ├── lang │ │ │ └── .gitkeep │ │ ├── sass │ │ │ └── app.scss │ │ └── views │ │ │ ├── .gitkeep │ │ │ └── index.blade.php │ │ ├── routes │ │ ├── .gitkeep │ │ ├── admin.php │ │ ├── api.php │ │ └── web.php │ │ ├── src │ │ ├── Actions │ │ │ └── .gitkeep │ │ ├── Console │ │ │ └── Commands │ │ │ │ └── .gitkeep │ │ ├── Http │ │ │ ├── Controllers │ │ │ │ └── .gitkeep │ │ │ ├── Middleware │ │ │ │ └── .gitkeep │ │ │ ├── Requests │ │ │ │ └── .gitkeep │ │ │ └── Services │ │ │ │ └── .gitkeep │ │ ├── Livewire │ │ │ └── .gitkeep │ │ ├── Models │ │ │ └── .gitkeep │ │ ├── Observer │ │ │ └── .gitkeep │ │ ├── Option.php │ │ ├── Page │ │ │ └── .gitkeep │ │ ├── Providers │ │ │ └── .gitkeep │ │ ├── UI │ │ │ └── Builder.php │ │ ├── ViewBuilder.php │ │ ├── WebsiteBuilderServiceProvider.php │ │ └── Widget │ │ │ └── .gitkeep │ │ ├── theme │ │ └── .gitkeep │ │ └── vite.config.js ├── modules │ └── builder_old │ │ ├── .github │ │ └── FUNDING.yml │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── Tests │ │ ├── Feature │ │ │ └── .gitkeep │ │ └── Unit │ │ │ └── .gitkeep │ │ ├── composer.json │ │ ├── config │ │ ├── .gitkeep │ │ └── builder.php │ │ ├── database │ │ ├── factories │ │ │ └── .gitkeep │ │ ├── migrations │ │ │ ├── .gitkeep │ │ │ ├── 2024_01_17_000000_create_builder_plugins_table.php │ │ │ └── 2024_01_19_000000_create_builder_templates_table.php │ │ └── seeders │ │ │ └── .gitkeep │ │ ├── grapesjs-sokeio │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── dist │ │ │ ├── index.js │ │ │ └── index.js.map │ │ ├── package.json │ │ ├── src │ │ │ ├── blocks.js │ │ │ ├── commands │ │ │ │ ├── device.js │ │ │ │ ├── index.js │ │ │ │ ├── openImport.js │ │ │ │ ├── shortcode.js │ │ │ │ └── template.js │ │ │ ├── components.js │ │ │ ├── consts.js │ │ │ ├── index.js │ │ │ ├── locale │ │ │ │ └── en.js │ │ │ └── panels.js │ │ ├── tsconfig.json │ │ └── yarn.lock │ │ ├── helpers │ │ ├── constraint.php │ │ └── function.php │ │ ├── module.json │ │ ├── package.json │ │ ├── plugins │ │ └── .gitkeep │ │ ├── public │ │ ├── .gitkeep │ │ ├── build │ │ │ ├── assets │ │ │ │ ├── app-50e139b7.css │ │ │ │ └── app-5aa2def9.js │ │ │ └── manifest.json │ │ ├── grapesjs-sokeio │ │ │ └── dist │ │ │ │ ├── index.js │ │ │ │ └── index.js.map │ │ ├── grapesjs │ │ │ ├── grapes.min.css │ │ │ └── grapes.min.js │ │ ├── index.html │ │ └── template │ │ │ ├── hero0.jpg │ │ │ ├── hero1.jpg │ │ │ └── hero2.jpg │ │ ├── resources │ │ ├── .gitkeep │ │ ├── js │ │ │ ├── app.js │ │ │ ├── core │ │ │ │ └── plugin.js │ │ │ └── modules │ │ │ │ └── livewire-grapesjs.js │ │ ├── lang │ │ │ ├── .gitkeep │ │ │ └── en.json │ │ ├── sass │ │ │ ├── app.scss │ │ │ └── builder.scss │ │ ├── template-builders │ │ │ ├── features │ │ │ │ ├── features0.blade.php │ │ │ │ ├── features1.blade.php │ │ │ │ ├── features2.blade.php │ │ │ │ ├── features3.blade.php │ │ │ │ └── features4.blade.php │ │ │ ├── footers │ │ │ │ ├── footer0.blade.php │ │ │ │ ├── footer1.blade.php │ │ │ │ ├── footer2.blade.php │ │ │ │ ├── footer3.blade.php │ │ │ │ └── footer4.blade.php │ │ │ ├── headers │ │ │ │ ├── header0.blade.php │ │ │ │ ├── header1.blade.php │ │ │ │ ├── header2.blade.php │ │ │ │ ├── header3.blade.php │ │ │ │ ├── header4.blade.php │ │ │ │ ├── header5.blade.php │ │ │ │ ├── header6.blade.php │ │ │ │ └── header7.blade.php │ │ │ ├── heros │ │ │ │ ├── hero0.blade.php │ │ │ │ ├── hero1.blade.php │ │ │ │ └── hero2.blade.php │ │ │ └── pages │ │ │ │ ├── album.blade.php │ │ │ │ ├── blog.blade.php │ │ │ │ ├── checkout.blade.php │ │ │ │ ├── cover.blade.php │ │ │ │ ├── pricing.blade.php │ │ │ │ └── product.blade.php │ │ └── views │ │ │ ├── .gitkeep │ │ │ ├── components │ │ │ └── builder.blade.php │ │ │ ├── index.blade.php │ │ │ ├── tabs │ │ │ ├── block.blade.php │ │ │ ├── seo.blade.php │ │ │ ├── setting.blade.php │ │ │ └── template.blade.php │ │ │ ├── template-manager │ │ │ ├── index.blade.php │ │ │ └── item.blade.php │ │ │ └── template │ │ │ └── index.blade.php │ │ ├── routes │ │ ├── .gitkeep │ │ ├── admin.php │ │ ├── admin │ │ │ ├── .gitkeep │ │ │ └── builder.php │ │ ├── api.php │ │ ├── web.php │ │ └── web │ │ │ └── .gitkeep │ │ ├── src │ │ ├── BuilderServiceProvider.php │ │ ├── Commands │ │ │ └── .gitkeep │ │ ├── FormBuilder.php │ │ ├── Http │ │ │ ├── Controllers │ │ │ │ └── .gitkeep │ │ │ ├── Middleware │ │ │ │ └── .gitkeep │ │ │ └── Requests │ │ │ │ └── .gitkeep │ │ ├── Livewire │ │ │ ├── .gitkeep │ │ │ ├── Plugin │ │ │ │ ├── PluginForm.php │ │ │ │ └── PluginTable.php │ │ │ ├── Template │ │ │ │ ├── TemplateForm.php │ │ │ │ └── TemplateTable.php │ │ │ └── TemplateManager.php │ │ ├── Models │ │ │ ├── BuilderPlugin.php │ │ │ └── BuilderTemplate.php │ │ └── TemplateBuilder.php │ │ ├── vite.config.js │ │ └── yarn.lock ├── status.json └── theme │ └── WebsiteBuilder │ ├── .gitignore │ ├── composer.json │ ├── config │ └── websitebuilder.php │ ├── helpers │ ├── .gitkeep │ ├── constraint.php │ └── function.php │ ├── package.json │ ├── public │ ├── .gitkeep │ └── index.html │ ├── resources │ ├── .gitkeep │ ├── js │ │ └── app.js │ ├── lang │ │ └── .gitkeep │ ├── sass │ │ └── app.scss │ └── views │ │ ├── .gitkeep │ │ ├── common │ │ └── .gitkeep │ │ ├── errors │ │ └── .gitkeep │ │ ├── index.blade.php │ │ ├── layouts │ │ ├── .gitkeep │ │ ├── default.blade.php │ │ ├── layout.blade.php │ │ └── none.blade.php │ │ ├── pages │ │ └── .gitkeep │ │ ├── scope │ │ └── .gitkeep │ │ └── shared │ │ ├── .gitkeep │ │ ├── footer.blade.php │ │ └── header.blade.php │ ├── routes │ └── .gitkeep │ ├── src │ ├── Http │ │ ├── Controllers │ │ │ └── .gitkeep │ │ ├── Middleware │ │ │ └── .gitkeep │ │ ├── Requests │ │ │ └── .gitkeep │ │ └── Services │ │ │ └── .gitkeep │ ├── Livewire │ │ └── .gitkeep │ ├── Models │ │ └── .gitkeep │ ├── Option.php │ ├── Page │ │ └── .gitkeep │ ├── Providers │ │ └── .gitkeep │ ├── WebsiteBuilderServiceProvider.php │ └── Widget │ │ └── .gitkeep │ ├── theme.json │ └── vite.config.js ├── postcss.config.js ├── public ├── .htaccess ├── favicon.ico ├── index.php ├── platform │ ├── module │ │ ├── sokeio │ │ └── sokeio-page │ └── theme │ │ ├── admin │ │ └── site └── robots.txt ├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js └── views │ └── welcome.blade.php ├── routes ├── console.php └── web.php ├── sokeio.webp ├── storage ├── app │ ├── .gitignore │ ├── private │ │ └── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tailwind.config.js ├── tests ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php ├── vercel.json └── vite.config.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | 17 | [docker-compose.yml] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_TIMEZONE=UTC 6 | APP_URL=http://localhost 7 | 8 | APP_LOCALE=en 9 | APP_FALLBACK_LOCALE=en 10 | APP_FAKER_LOCALE=en_US 11 | 12 | APP_MAINTENANCE_DRIVER=file 13 | # APP_MAINTENANCE_STORE=database 14 | 15 | PHP_CLI_SERVER_WORKERS=4 16 | 17 | BCRYPT_ROUNDS=12 18 | 19 | LOG_CHANNEL=stack 20 | LOG_STACK=single 21 | LOG_DEPRECATIONS_CHANNEL=null 22 | LOG_LEVEL=debug 23 | 24 | DB_CONNECTION=sqlite 25 | # DB_HOST=127.0.0.1 26 | # DB_PORT=3306 27 | # DB_DATABASE=laravel 28 | # DB_USERNAME=root 29 | # DB_PASSWORD= 30 | 31 | SESSION_DRIVER=database 32 | SESSION_LIFETIME=120 33 | SESSION_ENCRYPT=false 34 | SESSION_PATH=/ 35 | SESSION_DOMAIN=null 36 | 37 | BROADCAST_CONNECTION=log 38 | FILESYSTEM_DISK=local 39 | QUEUE_CONNECTION=database 40 | 41 | CACHE_STORE=database 42 | CACHE_PREFIX= 43 | 44 | MEMCACHED_HOST=127.0.0.1 45 | 46 | REDIS_CLIENT=phpredis 47 | REDIS_HOST=127.0.0.1 48 | REDIS_PASSWORD=null 49 | REDIS_PORT=6379 50 | 51 | MAIL_MAILER=log 52 | MAIL_HOST=127.0.0.1 53 | MAIL_PORT=2525 54 | MAIL_USERNAME=null 55 | MAIL_PASSWORD=null 56 | MAIL_ENCRYPTION=null 57 | MAIL_FROM_ADDRESS="hello@example.com" 58 | MAIL_FROM_NAME="${APP_NAME}" 59 | 60 | AWS_ACCESS_KEY_ID= 61 | AWS_SECRET_ACCESS_KEY= 62 | AWS_DEFAULT_REGION=us-east-1 63 | AWS_BUCKET= 64 | AWS_USE_PATH_STYLE_ENDPOINT=false 65 | 66 | VITE_APP_NAME="${APP_NAME}" 67 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | 3 | *.blade.php diff=html 4 | *.css diff=css 5 | *.html diff=html 6 | *.md diff=markdown 7 | *.php diff=php 8 | 9 | /.github export-ignore 10 | CHANGELOG.md export-ignore 11 | .styleci.yml export-ignore 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.phpunit.cache 2 | /node_modules 3 | /public/build 4 | /public/hot 5 | /public/storage 6 | /storage/*.key 7 | /storage/pail 8 | /vendor 9 | .env 10 | .env.backup 11 | .env.production 12 | .phpactor.json 13 | .phpunit.result.cache 14 | Homestead.json 15 | Homestead.yaml 16 | auth.json 17 | npm-debug.log 18 | yarn-error.log 19 | /.fleet 20 | /.idea 21 | /.vscode 22 | /.zed 23 | composer.lock -------------------------------------------------------------------------------- /.vercelignore: -------------------------------------------------------------------------------- 1 | /vendor -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Sokeio 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. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Hello, 2 | I'm fixing it. 3 | 4 | ## Follow me: 5 | 6 | **Website**: https://sokeio.com/ 7 | 8 | **Email**: nguyenvanhau@gmail.com 9 | 10 | **Discord**: https://discord.gg/eaj9nR3n 11 | 12 | **Facebook***: https://www.facebook.com/groups/sokeio 13 | 14 | **Youtube**: https://www.youtube.com/@DevHau 15 | 16 | ## License 17 | 18 | [MIT](./LICENSE) 19 | -------------------------------------------------------------------------------- /api/index.php: -------------------------------------------------------------------------------- 1 | */ 13 | use HasFactory, Notifiable; 14 | 15 | /** 16 | * The attributes that are mass assignable. 17 | * 18 | * @var array 19 | */ 20 | protected $fillable = [ 21 | 'name', 22 | 'email', 23 | 'password', 24 | ]; 25 | 26 | /** 27 | * The attributes that should be hidden for serialization. 28 | * 29 | * @var array 30 | */ 31 | protected $hidden = [ 32 | 'password', 33 | 'remember_token', 34 | ]; 35 | 36 | /** 37 | * Get the attributes that should be cast. 38 | * 39 | * @return array 40 | */ 41 | protected function casts(): array 42 | { 43 | return [ 44 | 'email_verified_at' => 'datetime', 45 | 'password' => 'hashed', 46 | ]; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | handleCommand(new ArgvInput); 14 | 15 | exit($status); 16 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | withRouting( 9 | web: __DIR__.'/../routes/web.php', 10 | commands: __DIR__.'/../routes/console.php', 11 | health: '/up', 12 | ) 13 | ->withMiddleware(function (Middleware $middleware) { 14 | // 15 | }) 16 | ->withExceptions(function (Exceptions $exceptions) { 17 | // 18 | })->create(); 19 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /bootstrap/providers.php: -------------------------------------------------------------------------------- 1 | env('APP_NAME', 'Laravel'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Application Environment 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This value determines the "environment" your application is currently 24 | | running in. This may determine how you prefer to configure various 25 | | services the application utilizes. Set this in your ".env" file. 26 | | 27 | */ 28 | 29 | 'env' => env('APP_ENV', 'production'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Application Debug Mode 34 | |-------------------------------------------------------------------------- 35 | | 36 | | When your application is in debug mode, detailed error messages with 37 | | stack traces will be shown on every error that occurs within your 38 | | application. If disabled, a simple generic error page is shown. 39 | | 40 | */ 41 | 42 | 'debug' => (bool) env('APP_DEBUG', false), 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Application URL 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This URL is used by the console to properly generate URLs when using 50 | | the Artisan command line tool. You should set this to the root of 51 | | the application so that it's available within Artisan commands. 52 | | 53 | */ 54 | 55 | 'url' => env('APP_URL', 'http://localhost'), 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Application Timezone 60 | |-------------------------------------------------------------------------- 61 | | 62 | | Here you may specify the default timezone for your application, which 63 | | will be used by the PHP date and date-time functions. The timezone 64 | | is set to "UTC" by default as it is suitable for most use cases. 65 | | 66 | */ 67 | 68 | 'timezone' => env('APP_TIMEZONE', 'UTC'), 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Application Locale Configuration 73 | |-------------------------------------------------------------------------- 74 | | 75 | | The application locale determines the default locale that will be used 76 | | by Laravel's translation / localization methods. This option can be 77 | | set to any locale for which you plan to have translation strings. 78 | | 79 | */ 80 | 81 | 'locale' => env('APP_LOCALE', 'en'), 82 | 83 | 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), 84 | 85 | 'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'), 86 | 87 | /* 88 | |-------------------------------------------------------------------------- 89 | | Encryption Key 90 | |-------------------------------------------------------------------------- 91 | | 92 | | This key is utilized by Laravel's encryption services and should be set 93 | | to a random, 32 character string to ensure that all encrypted values 94 | | are secure. You should do this prior to deploying the application. 95 | | 96 | */ 97 | 98 | 'cipher' => 'AES-256-CBC', 99 | 100 | 'key' => env('APP_KEY'), 101 | 102 | 'previous_keys' => [ 103 | ...array_filter( 104 | explode(',', env('APP_PREVIOUS_KEYS', '')) 105 | ), 106 | ], 107 | 108 | /* 109 | |-------------------------------------------------------------------------- 110 | | Maintenance Mode Driver 111 | |-------------------------------------------------------------------------- 112 | | 113 | | These configuration options determine the driver used to determine and 114 | | manage Laravel's "maintenance mode" status. The "cache" driver will 115 | | allow maintenance mode to be controlled across multiple machines. 116 | | 117 | | Supported drivers: "file", "cache" 118 | | 119 | */ 120 | 121 | 'maintenance' => [ 122 | 'driver' => env('APP_MAINTENANCE_DRIVER', 'file'), 123 | 'store' => env('APP_MAINTENANCE_STORE', 'database'), 124 | ], 125 | 126 | ]; 127 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => env('AUTH_GUARD', 'web'), 18 | 'passwords' => env('AUTH_PASSWORD_BROKER', 'users'), 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | which utilizes session storage plus the Eloquent user provider. 29 | | 30 | | All authentication guards have a user provider, which defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | system used by the application. Typically, Eloquent is utilized. 33 | | 34 | | Supported: "session" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | ], 44 | 45 | /* 46 | |-------------------------------------------------------------------------- 47 | | User Providers 48 | |-------------------------------------------------------------------------- 49 | | 50 | | All authentication guards have a user provider, which defines how the 51 | | users are actually retrieved out of your database or other storage 52 | | system used by the application. Typically, Eloquent is utilized. 53 | | 54 | | If you have multiple user tables or models you may configure multiple 55 | | providers to represent the model / table. These providers may then 56 | | be assigned to any extra authentication guards you have defined. 57 | | 58 | | Supported: "database", "eloquent" 59 | | 60 | */ 61 | 62 | 'providers' => [ 63 | 'users' => [ 64 | 'driver' => 'eloquent', 65 | 'model' => env('AUTH_MODEL', App\Models\User::class), 66 | ], 67 | 68 | // 'users' => [ 69 | // 'driver' => 'database', 70 | // 'table' => 'users', 71 | // ], 72 | ], 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Resetting Passwords 77 | |-------------------------------------------------------------------------- 78 | | 79 | | These configuration options specify the behavior of Laravel's password 80 | | reset functionality, including the table utilized for token storage 81 | | and the user provider that is invoked to actually retrieve users. 82 | | 83 | | The expiry time is the number of minutes that each reset token will be 84 | | considered valid. This security feature keeps tokens short-lived so 85 | | they have less time to be guessed. You may change this as needed. 86 | | 87 | | The throttle setting is the number of seconds a user must wait before 88 | | generating more password reset tokens. This prevents the user from 89 | | quickly generating a very large amount of password reset tokens. 90 | | 91 | */ 92 | 93 | 'passwords' => [ 94 | 'users' => [ 95 | 'provider' => 'users', 96 | 'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'), 97 | 'expire' => 60, 98 | 'throttle' => 60, 99 | ], 100 | ], 101 | 102 | /* 103 | |-------------------------------------------------------------------------- 104 | | Password Confirmation Timeout 105 | |-------------------------------------------------------------------------- 106 | | 107 | | Here you may define the amount of seconds before a password confirmation 108 | | window expires and users are asked to re-enter their password via the 109 | | confirmation screen. By default, the timeout lasts for three hours. 110 | | 111 | */ 112 | 113 | 'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800), 114 | 115 | ]; 116 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_STORE', 'database'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | | Supported drivers: "array", "database", "file", "memcached", 30 | | "redis", "dynamodb", "octane", "null" 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'array' => [ 37 | 'driver' => 'array', 38 | 'serialize' => false, 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'connection' => env('DB_CACHE_CONNECTION'), 44 | 'table' => env('DB_CACHE_TABLE', 'cache'), 45 | 'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'), 46 | 'lock_table' => env('DB_CACHE_LOCK_TABLE'), 47 | ], 48 | 49 | 'file' => [ 50 | 'driver' => 'file', 51 | 'path' => storage_path('framework/cache/data'), 52 | 'lock_path' => storage_path('framework/cache/data'), 53 | ], 54 | 55 | 'memcached' => [ 56 | 'driver' => 'memcached', 57 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 58 | 'sasl' => [ 59 | env('MEMCACHED_USERNAME'), 60 | env('MEMCACHED_PASSWORD'), 61 | ], 62 | 'options' => [ 63 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 64 | ], 65 | 'servers' => [ 66 | [ 67 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 68 | 'port' => env('MEMCACHED_PORT', 11211), 69 | 'weight' => 100, 70 | ], 71 | ], 72 | ], 73 | 74 | 'redis' => [ 75 | 'driver' => 'redis', 76 | 'connection' => env('REDIS_CACHE_CONNECTION', 'cache'), 77 | 'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'), 78 | ], 79 | 80 | 'dynamodb' => [ 81 | 'driver' => 'dynamodb', 82 | 'key' => env('AWS_ACCESS_KEY_ID'), 83 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 84 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 85 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 86 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 87 | ], 88 | 89 | 'octane' => [ 90 | 'driver' => 'octane', 91 | ], 92 | 93 | ], 94 | 95 | /* 96 | |-------------------------------------------------------------------------- 97 | | Cache Key Prefix 98 | |-------------------------------------------------------------------------- 99 | | 100 | | When utilizing the APC, database, memcached, Redis, and DynamoDB cache 101 | | stores, there might be other applications using the same cache. For 102 | | that reason, you may prefix every cache key to avoid collisions. 103 | | 104 | */ 105 | 106 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), 107 | 108 | ]; 109 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DISK', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Below you may configure as many filesystem disks as necessary, and you 24 | | may even configure multiple disks for the same driver. Examples for 25 | | most supported storage drivers are configured here for reference. 26 | | 27 | | Supported drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app/private'), 36 | 'serve' => true, 37 | 'throw' => false, 38 | ], 39 | 40 | 'public' => [ 41 | 'driver' => 'local', 42 | 'root' => storage_path('app/public'), 43 | 'url' => env('APP_URL').'/storage', 44 | 'visibility' => 'public', 45 | 'throw' => false, 46 | ], 47 | 48 | 's3' => [ 49 | 'driver' => 's3', 50 | 'key' => env('AWS_ACCESS_KEY_ID'), 51 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 52 | 'region' => env('AWS_DEFAULT_REGION'), 53 | 'bucket' => env('AWS_BUCKET'), 54 | 'url' => env('AWS_URL'), 55 | 'endpoint' => env('AWS_ENDPOINT'), 56 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 57 | 'throw' => false, 58 | ], 59 | 60 | ], 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Symbolic Links 65 | |-------------------------------------------------------------------------- 66 | | 67 | | Here you may configure the symbolic links that will be created when the 68 | | `storage:link` Artisan command is executed. The array keys should be 69 | | the locations of the links and the values should be their targets. 70 | | 71 | */ 72 | 73 | 'links' => [ 74 | public_path('storage') => storage_path('app/public'), 75 | ], 76 | 77 | ]; 78 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Deprecations Log Channel 26 | |-------------------------------------------------------------------------- 27 | | 28 | | This option controls the log channel that should be used to log warnings 29 | | regarding deprecated PHP and library features. This allows you to get 30 | | your application ready for upcoming major versions of dependencies. 31 | | 32 | */ 33 | 34 | 'deprecations' => [ 35 | 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), 36 | 'trace' => env('LOG_DEPRECATIONS_TRACE', false), 37 | ], 38 | 39 | /* 40 | |-------------------------------------------------------------------------- 41 | | Log Channels 42 | |-------------------------------------------------------------------------- 43 | | 44 | | Here you may configure the log channels for your application. Laravel 45 | | utilizes the Monolog PHP logging library, which includes a variety 46 | | of powerful log handlers and formatters that you're free to use. 47 | | 48 | | Available drivers: "single", "daily", "slack", "syslog", 49 | | "errorlog", "monolog", "custom", "stack" 50 | | 51 | */ 52 | 53 | 'channels' => [ 54 | 55 | 'stack' => [ 56 | 'driver' => 'stack', 57 | 'channels' => explode(',', env('LOG_STACK', 'single')), 58 | 'ignore_exceptions' => false, 59 | ], 60 | 61 | 'single' => [ 62 | 'driver' => 'single', 63 | 'path' => storage_path('logs/laravel.log'), 64 | 'level' => env('LOG_LEVEL', 'debug'), 65 | 'replace_placeholders' => true, 66 | ], 67 | 68 | 'daily' => [ 69 | 'driver' => 'daily', 70 | 'path' => storage_path('logs/laravel.log'), 71 | 'level' => env('LOG_LEVEL', 'debug'), 72 | 'days' => env('LOG_DAILY_DAYS', 14), 73 | 'replace_placeholders' => true, 74 | ], 75 | 76 | 'slack' => [ 77 | 'driver' => 'slack', 78 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 79 | 'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'), 80 | 'emoji' => env('LOG_SLACK_EMOJI', ':boom:'), 81 | 'level' => env('LOG_LEVEL', 'critical'), 82 | 'replace_placeholders' => true, 83 | ], 84 | 85 | 'papertrail' => [ 86 | 'driver' => 'monolog', 87 | 'level' => env('LOG_LEVEL', 'debug'), 88 | 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 89 | 'handler_with' => [ 90 | 'host' => env('PAPERTRAIL_URL'), 91 | 'port' => env('PAPERTRAIL_PORT'), 92 | 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), 93 | ], 94 | 'processors' => [PsrLogMessageProcessor::class], 95 | ], 96 | 97 | 'stderr' => [ 98 | 'driver' => 'monolog', 99 | 'level' => env('LOG_LEVEL', 'debug'), 100 | 'handler' => StreamHandler::class, 101 | 'formatter' => env('LOG_STDERR_FORMATTER'), 102 | 'with' => [ 103 | 'stream' => 'php://stderr', 104 | ], 105 | 'processors' => [PsrLogMessageProcessor::class], 106 | ], 107 | 108 | 'syslog' => [ 109 | 'driver' => 'syslog', 110 | 'level' => env('LOG_LEVEL', 'debug'), 111 | 'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER), 112 | 'replace_placeholders' => true, 113 | ], 114 | 115 | 'errorlog' => [ 116 | 'driver' => 'errorlog', 117 | 'level' => env('LOG_LEVEL', 'debug'), 118 | 'replace_placeholders' => true, 119 | ], 120 | 121 | 'null' => [ 122 | 'driver' => 'monolog', 123 | 'handler' => NullHandler::class, 124 | ], 125 | 126 | 'emergency' => [ 127 | 'path' => storage_path('logs/laravel.log'), 128 | ], 129 | 130 | ], 131 | 132 | ]; 133 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'log'), 18 | 19 | /* 20 | |-------------------------------------------------------------------------- 21 | | Mailer Configurations 22 | |-------------------------------------------------------------------------- 23 | | 24 | | Here you may configure all of the mailers used by your application plus 25 | | their respective settings. Several examples have been configured for 26 | | you and you are free to add your own as your application requires. 27 | | 28 | | Laravel supports a variety of mail "transport" drivers that can be used 29 | | when delivering an email. You may specify which one you're using for 30 | | your mailers below. You may also add additional mailers if needed. 31 | | 32 | | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", 33 | | "postmark", "resend", "log", "array", 34 | | "failover", "roundrobin" 35 | | 36 | */ 37 | 38 | 'mailers' => [ 39 | 40 | 'smtp' => [ 41 | 'transport' => 'smtp', 42 | 'url' => env('MAIL_URL'), 43 | 'host' => env('MAIL_HOST', '127.0.0.1'), 44 | 'port' => env('MAIL_PORT', 2525), 45 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 46 | 'username' => env('MAIL_USERNAME'), 47 | 'password' => env('MAIL_PASSWORD'), 48 | 'timeout' => null, 49 | 'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)), 50 | ], 51 | 52 | 'ses' => [ 53 | 'transport' => 'ses', 54 | ], 55 | 56 | 'postmark' => [ 57 | 'transport' => 'postmark', 58 | // 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'), 59 | // 'client' => [ 60 | // 'timeout' => 5, 61 | // ], 62 | ], 63 | 64 | 'resend' => [ 65 | 'transport' => 'resend', 66 | ], 67 | 68 | 'sendmail' => [ 69 | 'transport' => 'sendmail', 70 | 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), 71 | ], 72 | 73 | 'log' => [ 74 | 'transport' => 'log', 75 | 'channel' => env('MAIL_LOG_CHANNEL'), 76 | ], 77 | 78 | 'array' => [ 79 | 'transport' => 'array', 80 | ], 81 | 82 | 'failover' => [ 83 | 'transport' => 'failover', 84 | 'mailers' => [ 85 | 'smtp', 86 | 'log', 87 | ], 88 | ], 89 | 90 | 'roundrobin' => [ 91 | 'transport' => 'roundrobin', 92 | 'mailers' => [ 93 | 'ses', 94 | 'postmark', 95 | ], 96 | ], 97 | 98 | ], 99 | 100 | /* 101 | |-------------------------------------------------------------------------- 102 | | Global "From" Address 103 | |-------------------------------------------------------------------------- 104 | | 105 | | You may wish for all emails sent by your application to be sent from 106 | | the same address. Here you may specify a name and address that is 107 | | used globally for all emails that are sent by your application. 108 | | 109 | */ 110 | 111 | 'from' => [ 112 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 113 | 'name' => env('MAIL_FROM_NAME', 'Example'), 114 | ], 115 | 116 | ]; 117 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'database'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection options for every queue backend 24 | | used by your application. An example configuration is provided for 25 | | each backend supported by Laravel. You're also free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'connection' => env('DB_QUEUE_CONNECTION'), 40 | 'table' => env('DB_QUEUE_TABLE', 'jobs'), 41 | 'queue' => env('DB_QUEUE', 'default'), 42 | 'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90), 43 | 'after_commit' => false, 44 | ], 45 | 46 | 'beanstalkd' => [ 47 | 'driver' => 'beanstalkd', 48 | 'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'), 49 | 'queue' => env('BEANSTALKD_QUEUE', 'default'), 50 | 'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90), 51 | 'block_for' => 0, 52 | 'after_commit' => false, 53 | ], 54 | 55 | 'sqs' => [ 56 | 'driver' => 'sqs', 57 | 'key' => env('AWS_ACCESS_KEY_ID'), 58 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 59 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 60 | 'queue' => env('SQS_QUEUE', 'default'), 61 | 'suffix' => env('SQS_SUFFIX'), 62 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 63 | 'after_commit' => false, 64 | ], 65 | 66 | 'redis' => [ 67 | 'driver' => 'redis', 68 | 'connection' => env('REDIS_QUEUE_CONNECTION', 'default'), 69 | 'queue' => env('REDIS_QUEUE', 'default'), 70 | 'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90), 71 | 'block_for' => null, 72 | 'after_commit' => false, 73 | ], 74 | 75 | ], 76 | 77 | /* 78 | |-------------------------------------------------------------------------- 79 | | Job Batching 80 | |-------------------------------------------------------------------------- 81 | | 82 | | The following options configure the database and table that store job 83 | | batching information. These options can be updated to any database 84 | | connection and table which has been defined by your application. 85 | | 86 | */ 87 | 88 | 'batching' => [ 89 | 'database' => env('DB_CONNECTION', 'sqlite'), 90 | 'table' => 'job_batches', 91 | ], 92 | 93 | /* 94 | |-------------------------------------------------------------------------- 95 | | Failed Queue Jobs 96 | |-------------------------------------------------------------------------- 97 | | 98 | | These options configure the behavior of failed queue job logging so you 99 | | can control how and where failed jobs are stored. Laravel ships with 100 | | support for storing failed jobs in a simple file or in a database. 101 | | 102 | | Supported drivers: "database-uuids", "dynamodb", "file", "null" 103 | | 104 | */ 105 | 106 | 'failed' => [ 107 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 108 | 'database' => env('DB_CONNECTION', 'sqlite'), 109 | 'table' => 'failed_jobs', 110 | ], 111 | 112 | ]; 113 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'token' => env('POSTMARK_TOKEN'), 19 | ], 20 | 21 | 'ses' => [ 22 | 'key' => env('AWS_ACCESS_KEY_ID'), 23 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 24 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 25 | ], 26 | 27 | 'resend' => [ 28 | 'key' => env('RESEND_KEY'), 29 | ], 30 | 31 | 'slack' => [ 32 | 'notifications' => [ 33 | 'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'), 34 | 'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'), 35 | ], 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class UserFactory extends Factory 13 | { 14 | /** 15 | * The current password being used by the factory. 16 | */ 17 | protected static ?string $password; 18 | 19 | /** 20 | * Define the model's default state. 21 | * 22 | * @return array 23 | */ 24 | public function definition(): array 25 | { 26 | return [ 27 | 'name' => fake()->name(), 28 | 'email' => fake()->unique()->safeEmail(), 29 | 'email_verified_at' => now(), 30 | 'password' => static::$password ??= Hash::make('password'), 31 | 'remember_token' => Str::random(10), 32 | ]; 33 | } 34 | 35 | /** 36 | * Indicate that the model's email address should be unverified. 37 | */ 38 | public function unverified(): static 39 | { 40 | return $this->state(fn (array $attributes) => [ 41 | 'email_verified_at' => null, 42 | ]); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /database/migrations/0001_01_01_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('name'); 17 | $table->string('email')->unique(); 18 | $table->timestamp('email_verified_at')->nullable(); 19 | $table->string('password'); 20 | $table->rememberToken(); 21 | $table->timestamps(); 22 | }); 23 | 24 | Schema::create('password_reset_tokens', function (Blueprint $table) { 25 | $table->string('email')->primary(); 26 | $table->string('token'); 27 | $table->timestamp('created_at')->nullable(); 28 | }); 29 | 30 | Schema::create('sessions', function (Blueprint $table) { 31 | $table->string('id')->primary(); 32 | $table->foreignId('user_id')->nullable()->index(); 33 | $table->string('ip_address', 45)->nullable(); 34 | $table->text('user_agent')->nullable(); 35 | $table->longText('payload'); 36 | $table->integer('last_activity')->index(); 37 | }); 38 | } 39 | 40 | /** 41 | * Reverse the migrations. 42 | */ 43 | public function down(): void 44 | { 45 | Schema::dropIfExists('users'); 46 | Schema::dropIfExists('password_reset_tokens'); 47 | Schema::dropIfExists('sessions'); 48 | } 49 | }; 50 | -------------------------------------------------------------------------------- /database/migrations/0001_01_01_000001_create_cache_table.php: -------------------------------------------------------------------------------- 1 | string('key')->primary(); 16 | $table->mediumText('value'); 17 | $table->integer('expiration'); 18 | }); 19 | 20 | Schema::create('cache_locks', function (Blueprint $table) { 21 | $table->string('key')->primary(); 22 | $table->string('owner'); 23 | $table->integer('expiration'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | */ 30 | public function down(): void 31 | { 32 | Schema::dropIfExists('cache'); 33 | Schema::dropIfExists('cache_locks'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /database/migrations/0001_01_01_000002_create_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('queue')->index(); 17 | $table->longText('payload'); 18 | $table->unsignedTinyInteger('attempts'); 19 | $table->unsignedInteger('reserved_at')->nullable(); 20 | $table->unsignedInteger('available_at'); 21 | $table->unsignedInteger('created_at'); 22 | }); 23 | 24 | Schema::create('job_batches', function (Blueprint $table) { 25 | $table->string('id')->primary(); 26 | $table->string('name'); 27 | $table->integer('total_jobs'); 28 | $table->integer('pending_jobs'); 29 | $table->integer('failed_jobs'); 30 | $table->longText('failed_job_ids'); 31 | $table->mediumText('options')->nullable(); 32 | $table->integer('cancelled_at')->nullable(); 33 | $table->integer('created_at'); 34 | $table->integer('finished_at')->nullable(); 35 | }); 36 | 37 | Schema::create('failed_jobs', function (Blueprint $table) { 38 | $table->id(); 39 | $table->string('uuid')->unique(); 40 | $table->text('connection'); 41 | $table->text('queue'); 42 | $table->longText('payload'); 43 | $table->longText('exception'); 44 | $table->timestamp('failed_at')->useCurrent(); 45 | }); 46 | } 47 | 48 | /** 49 | * Reverse the migrations. 50 | */ 51 | public function down(): void 52 | { 53 | Schema::dropIfExists('jobs'); 54 | Schema::dropIfExists('job_batches'); 55 | Schema::dropIfExists('failed_jobs'); 56 | } 57 | }; 58 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 17 | 18 | User::factory()->create([ 19 | 'name' => 'Test User', 20 | 'email' => 'test@example.com', 21 | ]); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "build": "vite build", 6 | "dev": "vite" 7 | 8 | }, 9 | "devDependencies": { 10 | "autoprefixer": "^10.4.20", 11 | "axios": "^1.7.4", 12 | "concurrently": "^9.0.1", 13 | "laravel-vite-plugin": "^1.0", 14 | "postcss": "^8.4.47", 15 | "tailwindcss": "^3.4.13", 16 | "vite": "^5.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | tests/Unit 10 | 11 | 12 | tests/Feature 13 | 14 | 15 | 16 | 17 | app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /platform/dashboard.json: -------------------------------------------------------------------------------- 1 | {"default":[{"key":"3d8d310135385a93bf257215e073077d","name":"Permission count","dashboard":"default","show":true},{"key":"42586813da85eabf44716f9ccff9da26","name":"Role count","dashboard":"default","show":true},{"key":"101c0339664a135ec4e0a7b2db33807f","name":"User count","dashboard":"default","show":true}]} -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | node_modules/ 3 | npm-debug.log 4 | yarn-error.log -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/Tests/Feature/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/module/WebsiteBuilder/Tests/Feature/.gitkeep -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/Tests/Unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/module/WebsiteBuilder/Tests/Unit/.gitkeep -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sokeio/module-websitebuilder", 3 | "description": "", 4 | "authors": [ 5 | { 6 | "name": "Nguyen Van Hau", 7 | "email": "nguyenvanhaudev@gmail.com" 8 | } 9 | ], 10 | "extra": { 11 | "laravel": { 12 | "providers": ["Sokeio\\Module\\WebsiteBuilder\\WebsiteBuilderServiceProvider"], 13 | "aliases": {} 14 | } 15 | }, 16 | "autoload": { 17 | "files": [ 18 | "helpers/constraint.php", 19 | "helpers/function.php" 20 | ], 21 | "psr-4": { 22 | "Sokeio\\Module\\WebsiteBuilder\\": "src", 23 | "Sokeio\\Module\\WebsiteBuilder\\Database\\Factories\\": "database/factories", 24 | "Sokeio\\Module\\WebsiteBuilder\\Database\\Seeders\\": "database/seeders" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/config/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/module/WebsiteBuilder/config/.gitkeep -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/config/websitebuilder.php: -------------------------------------------------------------------------------- 1 | 'WebsiteBuilder', 5 | 'commands' => [] 6 | ]; 7 | -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/database/factories/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/module/WebsiteBuilder/database/factories/.gitkeep -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/database/migrations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/module/WebsiteBuilder/database/migrations/.gitkeep -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/database/seeders/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/module/WebsiteBuilder/database/seeders/.gitkeep -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/module/WebsiteBuilder/helpers/.gitkeep -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/helpers/constraint.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Stop hacker!. 4 | 5 | 6 |

Stop hacker!.

7 |

Thanks for you.

8 | 9 | -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/module/WebsiteBuilder/resources/.gitkeep -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/resources/js/app.js: -------------------------------------------------------------------------------- 1 | console.log('hello'); -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/resources/lang/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/module/WebsiteBuilder/resources/lang/.gitkeep -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | .test{display:none;} -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/resources/views/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/module/WebsiteBuilder/resources/views/.gitkeep -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/resources/views/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends(themeLayout()) 2 | 3 | @section('content') 4 |

Hello World

5 | 6 |

7 | This view is loaded from module: {!! config('$LOWER_NAME$.name') !!} 8 |

9 | @endsection 10 | -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/routes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/module/WebsiteBuilder/routes/.gitkeep -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/routes/admin.php: -------------------------------------------------------------------------------- 1 | get('/websitebuilder', function (Request $request) { 18 | return $request->user(); 19 | }); -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/routes/web.php: -------------------------------------------------------------------------------- 1 | name('websitebuilder') 21 | ->hasConfigFile() 22 | ->hasViews() 23 | ->hasHelpers() 24 | ->hasAssets() 25 | ->hasTranslations() 26 | ->runsMigrations(); 27 | } 28 | public function packageRegistered() 29 | { 30 | // packageRegistered 31 | } 32 | 33 | public function packageBooted() 34 | { 35 | // packageBooted 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/src/Widget/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/module/WebsiteBuilder/src/Widget/.gitkeep -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/theme/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/module/WebsiteBuilder/theme/.gitkeep -------------------------------------------------------------------------------- /platform/module/WebsiteBuilder/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin2'; 3 | 4 | export default defineConfig({ 5 | plugins: [ 6 | laravel([ 7 | 'resources/js/app.js', 8 | 'resources/sass/app.scss', 9 | ]), 10 | ] 11 | }); -------------------------------------------------------------------------------- /platform/modules/builder_old/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: devhau # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: devhau # Replace with a single Patreon username 5 | open_collective: Sokeio # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /platform/modules/builder_old/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | node_modules/ 3 | npm-debug.log 4 | yarn-error.log 5 | 6 | # Laravel 4 specific 7 | bootstrap/compiled.php 8 | app/storage/ 9 | 10 | # Laravel 5 & Lumen specific 11 | public/storage 12 | public/hot 13 | 14 | # Laravel 5 & Lumen specific with changed public path 15 | public_html/storage 16 | public_html/hot 17 | 18 | storage/*.key 19 | .env 20 | Homestead.yaml 21 | Homestead.json 22 | /.vagrant 23 | .phpunit.result.cache 24 | -------------------------------------------------------------------------------- /platform/modules/builder_old/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Sokeio 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. 22 | -------------------------------------------------------------------------------- /platform/modules/builder_old/README.md: -------------------------------------------------------------------------------- 1 | # Sokeio/Builder 2 | -------------------------------------------------------------------------------- /platform/modules/builder_old/Tests/Feature/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/Tests/Feature/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/Tests/Unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/Tests/Unit/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sokeio/builder", 3 | "description": "", 4 | "authors": [ 5 | { 6 | "name": "Nguyen Van Hau", 7 | "email": "nguyenvanhaudev@gmail.com" 8 | } 9 | ], 10 | "license": "MIT", 11 | "require": { 12 | "php": "^8.1" 13 | }, 14 | "extra": { 15 | "laravel": { 16 | "providers": [ 17 | "Sokeio\\Builder\\BuilderServiceProvider" 18 | ], 19 | "aliases": {} 20 | } 21 | }, 22 | "autoload": { 23 | "files": [ 24 | "helpers/constraint.php", 25 | "helpers/function.php" 26 | ], 27 | "psr-4": { 28 | "Sokeio\\Builder\\": "src", 29 | "Sokeio\\Builder\\Database\\Factories\\": "database/factories", 30 | "Sokeio\\Builder\\Database\\Seeders\\": "database/seeders" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /platform/modules/builder_old/config/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/config/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/config/builder.php: -------------------------------------------------------------------------------- 1 | 'Builder', 5 | 'commands' => [], 6 | 'fields' => [], 7 | 'shortcodes' => [], 8 | 'actions' => [], 9 | 'widgets' => [], 10 | ]; 11 | -------------------------------------------------------------------------------- /platform/modules/builder_old/database/factories/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/database/factories/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/database/migrations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/database/migrations/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/database/migrations/2024_01_17_000000_create_builder_plugins_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('name'); 17 | $table->text('js')->nullable(); 18 | $table->text('css')->nullable(); 19 | $table->text('options')->nullable(); 20 | $table->boolean('is_active')->default(0)->nullable(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | */ 28 | public function down(): void 29 | { 30 | Schema::dropIfExists('builder_plugins'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /platform/modules/builder_old/database/migrations/2024_01_19_000000_create_builder_templates_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('name'); 17 | $table->string('description', 400)->nullable()->default(''); 18 | $table->longText('content'); 19 | $table->integer('author_id'); 20 | $table->string('status', 60)->default('published'); 21 | $table->text('js')->nullable(); 22 | $table->text('css')->nullable(); 23 | $table->text('topic')->nullable(); 24 | $table->text('category')->nullable(); 25 | $table->text('thumbnail')->nullable(); 26 | $table->text('email')->nullable(); 27 | $table->boolean('only_me')->nullable(); 28 | $table->timestamps(); 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | */ 35 | public function down(): void 36 | { 37 | Schema::dropIfExists('builder_templates'); 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /platform/modules/builder_old/database/seeders/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/database/seeders/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | private/ 3 | /locale 4 | node_modules/ 5 | *.log 6 | _index.html 7 | stats.json -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/.npmignore: -------------------------------------------------------------------------------- 1 | .* 2 | *.log 3 | *.html 4 | **/tsconfig.json 5 | **/webpack.config.js 6 | node_modules 7 | src -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023-current sokeio.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/README.md: -------------------------------------------------------------------------------- 1 | # Grapesjs Shortcode 2 | 3 | [DEMO](##) 4 | > **Provide a live demo of your plugin** 5 | For a better user engagement create a simple live demo by using services like [JSFiddle](https://jsfiddle.net) [CodeSandbox](https://codesandbox.io) [CodePen](https://codepen.io) and link it here in your README (attaching a screenshot/gif will also be a plus). 6 | To help you in this process here below you will find the necessary HTML/CSS/JS, so it just a matter of copy-pasting on some of those services. After that delete this part and update the link above 7 | 8 | ### HTML 9 | ```html 10 | 11 | 12 | 13 | 14 |
15 | ``` 16 | 17 | ### JS 18 | ```js 19 | const editor = grapesjs.init({ 20 | container: '#gjs', 21 | height: '100%', 22 | fromElement: true, 23 | storageManager: false, 24 | plugins: ['grapesjs-sokeio-builder'], 25 | }); 26 | ``` 27 | 28 | ### CSS 29 | ```css 30 | body, html { 31 | margin: 0; 32 | height: 100%; 33 | } 34 | ``` 35 | 36 | 37 | ## Summary 38 | 39 | * Plugin name: `grapesjs-sokeio-builder` 40 | * Components 41 | * `component-id-1` 42 | * `component-id-2` 43 | * ... 44 | * Blocks 45 | * `block-id-1` 46 | * `block-id-2` 47 | * ... 48 | 49 | 50 | 51 | ## Options 52 | 53 | | Option | Description | Default | 54 | |-|-|- 55 | | `option1` | Description option | `default value` | 56 | 57 | 58 | 59 | ## Download 60 | 61 | * CDN 62 | * `https://unpkg.com/grapesjs-sokeio-builder` 63 | * NPM 64 | * `npm i grapesjs-sokeio-builder` 65 | * GIT 66 | * `git clone https://github.com/YOUR-USERNAME/grapesjs-sokeio-builder.git` 67 | 68 | 69 | 70 | ## Usage 71 | 72 | Directly in the browser 73 | ```html 74 | 75 | 76 | 77 | 78 |
79 | 80 | 90 | ``` 91 | 92 | Modern javascript 93 | ```js 94 | import grapesjs from 'grapesjs'; 95 | import plugin from 'grapesjs-sokeio-builder'; 96 | import 'grapesjs/dist/css/grapes.min.css'; 97 | 98 | const editor = grapesjs.init({ 99 | container : '#gjs', 100 | // ... 101 | plugins: [plugin], 102 | pluginsOpts: { 103 | [plugin]: { /* options */ } 104 | } 105 | // or 106 | plugins: [ 107 | editor => plugin(editor, { /* options */ }), 108 | ], 109 | }); 110 | ``` 111 | 112 | 113 | 114 | ## Development 115 | 116 | Clone the repository 117 | 118 | ```sh 119 | $ git clone https://github.com/YOUR-USERNAME/grapesjs-sokeio-builder.git 120 | $ cd grapesjs-sokeio-builder 121 | ``` 122 | 123 | Install dependencies 124 | 125 | ```sh 126 | $ npm i 127 | ``` 128 | 129 | Start the dev server 130 | 131 | ```sh 132 | $ npm start 133 | ``` 134 | 135 | Build the source 136 | 137 | ```sh 138 | $ npm run build 139 | ``` 140 | 141 | 142 | 143 | ## License 144 | 145 | MIT 146 | -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "grapesjs-sokeio", 3 | "version": "1.0.65", 4 | "description": "Grapesjs Shortcode", 5 | "main": "dist/index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/sokeio/grapesjs-builder.git" 9 | }, 10 | "scripts": { 11 | "start": "grapesjs-cli serve", 12 | "build": "grapesjs-cli build", 13 | "bump": "npm version patch -m 'Bump v%s'", 14 | "cp": "cp -R dist/* ../public/grapesjs-sokeio/dist/", 15 | "dev": "yarn build && yarn cp" 16 | }, 17 | "keywords": [ 18 | "grapesjs", 19 | "plugin" 20 | ], 21 | "devDependencies": { 22 | "grapesjs-cli": "^4.1.3" 23 | }, 24 | "license": "MIT" 25 | } 26 | -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/src/blocks.js: -------------------------------------------------------------------------------- 1 | export default (editor, opts = {}) => { 2 | const bm = editor.BlockManager; 3 | 4 | bm.add("shortcode", { 5 | label: "ShortCode", 6 | category: "Common", 7 | content: '
', 8 | media: 9 | '', 10 | }); 11 | }; 12 | -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/src/commands/device.js: -------------------------------------------------------------------------------- 1 | import { 2 | cmdDeviceDesktop, 3 | cmdDeviceTablet, 4 | cmdDeviceMobile, 5 | cmdClear, 6 | } from "./../consts"; 7 | 8 | export default (editor, opts = {}) => { 9 | const Commands = editor.Commands; 10 | const txtConfirm = opts.textCleanCanvas; 11 | Commands.add(cmdDeviceDesktop, { 12 | run: (ed) => ed.setDevice("Desktop"), 13 | stop: () => {}, 14 | }); 15 | Commands.add(cmdDeviceTablet, { 16 | run: (ed) => ed.setDevice("Tablet"), 17 | stop: () => {}, 18 | }); 19 | Commands.add(cmdDeviceMobile, { 20 | run: (ed) => ed.setDevice("Mobile portrait"), 21 | stop: () => {}, 22 | }); 23 | Commands.add( 24 | cmdClear, 25 | (e) => confirm(txtConfirm) && e.runCommand("core:canvas-clear") 26 | ); 27 | }; 28 | -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/src/commands/index.js: -------------------------------------------------------------------------------- 1 | import openImport from "./openImport"; 2 | import shortcode from "./shortcode"; 3 | import device from "./device"; 4 | import template from "./template"; 5 | export default (editor, opts = {}) => { 6 | openImport(editor, opts); 7 | shortcode(editor, opts); 8 | device(editor, opts); 9 | template(editor, opts); 10 | }; 11 | -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/src/commands/openImport.js: -------------------------------------------------------------------------------- 1 | import { cmdImport } from "./../consts"; 2 | 3 | export default (editor, opts = {}) => { 4 | const pfx = editor.getConfig("stylePrefix"); 5 | const importLabel = opts.modalImportLabel; 6 | const importCnt = opts.modalImportContent; 7 | 8 | editor.Commands.add(cmdImport, { 9 | codeViewer: null, 10 | container: null, 11 | 12 | run(editor) { 13 | const codeContent = 14 | typeof importCnt == "function" ? importCnt(editor) : importCnt; 15 | const codeViewer = this.getCodeViewer(); 16 | editor.Modal.open({ 17 | title: opts.modalImportTitle, 18 | content: this.getContainer(), 19 | }).onceClose(() => editor.stopCommand(cmdImport)); 20 | codeViewer.setContent(codeContent ?? ""); 21 | codeViewer.refresh(); 22 | setTimeout(() => codeViewer.focus(), 0); 23 | }, 24 | 25 | stop() { 26 | editor.Modal.close(); 27 | }, 28 | 29 | getContainer() { 30 | if (!this.container) { 31 | const codeViewer = this.getCodeViewer(); 32 | const container = document.createElement("div"); 33 | container.className = `${pfx}import-container`; 34 | 35 | // Import Label 36 | if (importLabel) { 37 | const labelEl = document.createElement("div"); 38 | labelEl.className = `${pfx}import-label`; 39 | labelEl.innerHTML = importLabel; 40 | container.appendChild(labelEl); 41 | } 42 | 43 | container.appendChild(codeViewer.getElement()); 44 | 45 | // Import button 46 | const btnImp = document.createElement("button"); 47 | btnImp.type = "button"; 48 | btnImp.innerHTML = opts.modalImportButton; 49 | btnImp.className = `${pfx}btn-prim ${pfx}btn-import`; 50 | btnImp.onclick = () => { 51 | editor.Css.clear(); 52 | editor.setComponents(codeViewer.getContent().trim()); 53 | editor.Modal.close(); 54 | }; 55 | container.appendChild(btnImp); 56 | 57 | this.container = container; 58 | } 59 | 60 | return this.container; 61 | }, 62 | 63 | /** 64 | * Return the code viewer instance 65 | * @returns {CodeViewer} 66 | */ 67 | getCodeViewer() { 68 | if (!this.codeViewer) { 69 | this.codeViewer = editor.CodeManager.createViewer({ 70 | codeName: "htmlmixed", 71 | theme: "hopscotch", 72 | readOnly: false, 73 | ...opts.importViewerOptions, 74 | }); 75 | } 76 | 77 | return this.codeViewer; 78 | }, 79 | }); 80 | }; 81 | -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/src/commands/shortcode.js: -------------------------------------------------------------------------------- 1 | import { regexShortcode } from "../consts"; 2 | 3 | export default (editor, opts = {}) => { 4 | const command = editor.Commands; 5 | const openDialog = function (editor, sender, model) { 6 | if (window.openShortcodeSetting) { 7 | // sender && sender.set("active", 0); // turn off the button 8 | let div = document.createElement("div"); 9 | div.innerHTML = regexShortcode.test(model.get("content")) 10 | ? model.get("content") 11 | : decodeURIComponent(model.view.el.getAttribute("data-shortcode")); 12 | if (div.innerHTML.trim() == "null") div.innerHTML = ""; 13 | console.log(model.view.el.innerText); 14 | if ( 15 | !div.innerHTML.trim().length && 16 | regexShortcode.test(model.view.el.innerText) 17 | ) { 18 | div.innerHTML = model.view.el.innerText; 19 | } 20 | let shortcodeObj = window.getShortcodeObjectFromText(div.innerText); 21 | window.openShortcodeSetting( 22 | editor.getContainer(), 23 | shortcodeObj?.shortcode ?? "", 24 | shortcodeObj?.attributes ?? [], 25 | shortcodeObj?.content ?? "", 26 | function ($content) { 27 | model.set( 28 | "content", 29 | '
' + $content + "
" 30 | ); 31 | model.components( 32 | '
' + $content + "
" 33 | ); 34 | model.trigger("change:content"); 35 | editor.trigger("component:update"); 36 | // model.trigger("change"); 37 | // Render the changes 38 | model.view.render(); 39 | }, 40 | function () { 41 | sender.stop(); 42 | } 43 | ); 44 | } 45 | }; 46 | command.add("open-shortcode-dialog", { 47 | run: function (editor, sender, model) { 48 | openDialog(editor, sender, model); 49 | }, 50 | }); 51 | }; 52 | -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/src/commands/template.js: -------------------------------------------------------------------------------- 1 | export default (editor, opts = {}) => { 2 | const command = editor.Commands; 3 | const openDialog = function (editor, sender, model) { 4 | let callback = "eventAddComponent" + new Date().getTime(); 5 | 6 | let modal = window.SokeioManager.openModal( 7 | { 8 | $url: opts.urlTemplateManager, 9 | $title: opts.titleTemplateManager, 10 | $size: "modal-xl modal-fullscreen-lg-down", 11 | }, 12 | { callbackEvent: callback } 13 | ); 14 | window[callback] = function (template) { 15 | var newComponent = editor.DomComponents.addComponent(template); 16 | // Append the new component as a child of the selected component 17 | modal.hide(); 18 | model.components().add(newComponent); 19 | model.trigger("change:content"); 20 | editor.trigger("component:update"); 21 | // model.trigger("change"); 22 | // Render the changes 23 | model.view.render(); 24 | // Render the changes 25 | // editor.render(); 26 | }; 27 | }; 28 | command.add("open-template-dialog", { 29 | run: function (editor, sender, model) { 30 | openDialog(editor, sender, model); 31 | }, 32 | }); 33 | }; 34 | -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/src/components.js: -------------------------------------------------------------------------------- 1 | import { regexShortcode } from "./consts"; 2 | 3 | export default (editor, opts = {}) => { 4 | const domc = editor.Components; 5 | const cm = editor.Commands; 6 | const pfx = editor.Config.stylePrefix; 7 | const { useRenderShortcode } = opts; 8 | // editor.on("run:preview", (data) => { 9 | // console.log("run preview", isPreview(), data); 10 | // document.querySelector( 11 | // ".sokeio-builder-header__right .options-panel-manager" 12 | // ).innerHTML = ""; 13 | // editor.stopCommand("sw-visibility"); 14 | // editor.render(); 15 | // setTimeout(() => { 16 | // editor.getModel().stopDefault(); 17 | // const editorEl = editor.editorView.el; 18 | // console.log({ editor }); 19 | // if (editorEl.querySelector(`${pfx}off-prv`)) return; 20 | // const helper = document.createElement("span"); 21 | // helper.className = `${pfx}off-prv fa fa-eye-slash`; 22 | // editorEl.appendChild(helper); 23 | // helper.onclick = () => editor.stopCommand("preview"); 24 | // }, 100); 25 | // }); 26 | // editor.on("stop:preview", () => { 27 | // console.log(["stop preview", isPreview()]); 28 | // editor.refres(); 29 | // }); 30 | domc.addType("shortcode", { 31 | isComponent: (el) => 32 | // el.tagName === "DIV" && 33 | el.childElementCount == 0 && regexShortcode.test(el.innerText), 34 | model: { 35 | defaults: { 36 | tagName: "", 37 | name: "shortcode", 38 | draggable: true, 39 | droppable: false, 40 | removed: false, 41 | content: '
', 42 | }, 43 | }, 44 | 45 | view: { 46 | events: { 47 | click: "handleClick", 48 | }, 49 | handleClick: function (e) { 50 | editor.runCommand("open-shortcode-dialog", this.model); 51 | }, 52 | async onRender({ model }) { 53 | let html = this.el.innerHTML; 54 | if (!useRenderShortcode) return; 55 | if (regexShortcode.test(html) || regexShortcode.test(model.content)) { 56 | let $wireId = Alpine.closestRoot( 57 | editor.editorView.$el[0] 58 | )?.getAttribute("wire:id"); 59 | if ($wireId) { 60 | let shortcode = this.el.innerHTML; 61 | if (regexShortcode.test(model.content)) { 62 | shortcode = model.content; 63 | } 64 | let content = await Livewire.find($wireId).ConvertShortcodeToHtml( 65 | shortcode 66 | ); 67 | if (this.el.getAttribute("data-gjs-type") === "shortcode") { 68 | this.el.innerHTML = `${content}`; 69 | this.el.setAttribute("data-shortcode", encodeURIComponent(html)); 70 | } else { 71 | this.el.innerHTML = `
${content}
`; 72 | this.el.setAttribute( 73 | "data-shortcode", 74 | encodeURIComponent( 75 | '
' + html + "
" 76 | ) 77 | ); 78 | } 79 | } 80 | } 81 | }, 82 | }, 83 | }); 84 | editor.on("component:styleUpdate", function (model) { 85 | if (model && model.get("type") === "shortcode") { 86 | // Áp dụng kiểu CSS cho thành phần block shortcode trong canvas 87 | model.set({ 88 | style: { 89 | "min-height": "50px", 90 | padding: "20px", 91 | border: "1px dashed #ccc", 92 | "background-color": "rgba(0,0,0,0.1)", 93 | // Các thuộc tính style khác tùy ý 94 | }, 95 | }); 96 | } 97 | }); 98 | }; 99 | -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/src/consts.js: -------------------------------------------------------------------------------- 1 | export const cmdImport = "gjs-open-import-webpage"; 2 | export const cmdDeviceDesktop = "set-device-desktop"; 3 | export const cmdDeviceTablet = "set-device-tablet"; 4 | export const cmdDeviceMobile = "set-device-mobile"; 5 | export const cmdClear = "canvas-clear"; 6 | export const regexShortcode= /\[([\w-:]+)((?:\s+\w+\s*=\s*"[^"]*")*)(\](.*?)\[\/\1\]|\s*\/\])/s; 7 | -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/src/index.js: -------------------------------------------------------------------------------- 1 | import loadComponents from "./components"; 2 | import loadPanels from "./panels"; 3 | import loadCommands from "./commands"; 4 | import loadBlocks from "./blocks"; 5 | import en from "./locale/en"; 6 | 7 | export default (editor, opts = {}) => { 8 | const options = { 9 | ...{ 10 | i18n: {}, 11 | // default options 12 | }, 13 | modalImportTitle: "Import", 14 | modalImportButton: "Import", 15 | modalImportLabel: "", 16 | modalImportContent: "", 17 | importViewerOptions: {}, 18 | textCleanCanvas: "Are you sure you want to clear the canvas?", 19 | showStylesOnChange: true, 20 | useCustomTheme: true, 21 | titleTemplateManager: "Template Manager", 22 | urlTemplateManager: "", 23 | useRenderShortcode: false, 24 | ...opts, 25 | }; 26 | // Add panels 27 | loadPanels(editor, options); 28 | // Add commands 29 | loadCommands(editor, options); 30 | // Add components 31 | loadComponents(editor, options); 32 | // Add blocks 33 | loadBlocks(editor, options); 34 | // Load i18n files 35 | editor.I18n && 36 | editor.I18n.addMessages({ 37 | en, 38 | ...options.i18n, 39 | }); 40 | 41 | editor.on("component:selected", function (model) { 42 | const commandToAdd = "open-template-dialog"; 43 | const commandIcon = "fa fa-clock"; 44 | 45 | // get the selected componnet and its default toolbar 46 | const selectedComponent = editor.getSelected(); 47 | const defaultToolbar = selectedComponent.get("toolbar"); 48 | 49 | // check if this command already exists on this component toolbar 50 | const commandExists = defaultToolbar.some( 51 | (item) => item.command === commandToAdd 52 | ); 53 | 54 | // if it doesn't already exist, add it 55 | if (!commandExists) { 56 | console.log(defaultToolbar); 57 | selectedComponent.set({ 58 | toolbar: [ 59 | { 60 | label: 61 | '', 62 | command: commandToAdd, 63 | }, 64 | ...defaultToolbar, 65 | ], 66 | }); 67 | } 68 | }); 69 | 70 | editor.on("component:deselected", function (model) { 71 | model.view.el.querySelector(".div-builder-component-plus")?.remove(); 72 | }); 73 | editor.on("component:dblclick", function (model) { 74 | if (model && model.get("type") === "shortcode") { 75 | editor.runCommand("open-shortcode-dialog", model); 76 | } 77 | }); 78 | editor.on("block:drag:stop", function (model) { 79 | if (model && model.get("type") === "shortcode") { 80 | editor.runCommand("open-shortcode-dialog", model); 81 | } 82 | }); 83 | // TODO Remove 84 | // editor.on('load', () => 85 | // editor.addComponents( 86 | // `
87 | // Content loaded from the plugin 88 | //
`, 89 | // { at: 0 } 90 | // )) 91 | }; 92 | -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/src/locale/en.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'grapesjs-sokeio-builder': { 3 | // 'key': 'value', 4 | }, 5 | }; -------------------------------------------------------------------------------- /platform/modules/builder_old/grapesjs-sokeio/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "sourceMap": true, 11 | "skipLibCheck": true, 12 | "esModuleInterop": true, 13 | "allowSyntheticDefaultImports": true, 14 | "strict": true, 15 | "forceConsistentCasingInFileNames": true, 16 | "noFallthroughCasesInSwitch": true, 17 | "module": "esnext", 18 | "moduleResolution": "node", 19 | "resolveJsonModule": true, 20 | "isolatedModules": true, 21 | "noEmit": false 22 | }, 23 | "include": [ 24 | "src" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /platform/modules/builder_old/helpers/constraint.php: -------------------------------------------------------------------------------- 1 | js); 21 | Assets::AddStyle(trim($data->css)); 22 | Assets::AddScript($data->custom_js); 23 | Assets::AddStyle(trim($data->custom_css)); 24 | SEO::SEODataTransformer(function (SEOData $dataSeo) use ($data) { 25 | $dataSeo->title = page_title(); 26 | $dataSeo->description = $data->ddescriptione; 27 | $dataSeo->image = $data->image ? url($data->image) : null; 28 | $dataSeo->datePublished = $data->published_at; 29 | $dataSeo->dateModified = $data->updated_at; 30 | if ($seo = $data->seo->first()) { 31 | $seo->fillForSeo($dataSeo); 32 | } 33 | $dataSeo->schema = SchemaCollection::initialize()->addArticle(function (ArticleSchema $articleSchema) use ($data) { 34 | })->addBreadcrumbs(function (BreadcrumbListSchema $breadcrumbListSchema) { 35 | $breadcrumbListSchema->appendBreadcrumbs([]); 36 | }); 37 | return $dataSeo; 38 | }); 39 | return $data->content; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /platform/modules/builder_old/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "sokeio-builder-free", 3 | "name": "Sokeio Builder", 4 | "version": "v1.0.0", 5 | "alias": "builder", 6 | "description": "", 7 | "keywords": [], 8 | "priority": 200, 9 | "aliases": {}, 10 | "namespace": "Sokeio\\Builder", 11 | "requires": [] 12 | } 13 | -------------------------------------------------------------------------------- /platform/modules/builder_old/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "vite", 5 | "build": "vite build", 6 | "preview": "vite preview", 7 | "vite-cache": "vite clear" 8 | }, 9 | "devDependencies": { 10 | "vite": "^4.3.9", 11 | "laravel-vite-plugin2": "^0.7.8", 12 | "cross-env": "^7.0.3", 13 | "sass": "^1.43.4", 14 | "axios": "^1.3.5" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /platform/modules/builder_old/plugins/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/plugins/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/public/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/public/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/public/build/assets/app-5aa2def9.js: -------------------------------------------------------------------------------- 1 | class v{_manager;getKey(){return""}manager(d){this._manager=d}getManager(){return this._manager}register(){}booting(){}booted(){}dispose(){}}class m extends v{getKey(){return"SOKEIO_LIVEWIRE_GRAPESJS_MODULE"}booting(){if(window.Livewire){let t=this.getManager();const _=e=>{var n=document.createElement("div");n.innerHTML=e;var r=n.querySelector(".div-builder-component-plus");return r&&r.parentNode.removeChild(r),n.innerHTML=n.innerHTML.replace(/(.*?)<\/span>/g,"$1"),n.innerHTML};window.Livewire.directive("grapesjs",({el:e,directive:n,component:r})=>{if(n.modifiers.length>0||e.livewire____grapesjs)return;let a={};e.hasAttribute("wire:grapesjs.options")&&(a=new Function(`return ${e.getAttribute("wire:grapesjs.options")};`)());const g=a.pluginManager??[];a?.pluginManager&&(a={...a,pluginManager:void 0});const c=i=>{var s='',p="",w=i.replace(/\[(\/?[^\]]+)\]/g,function(f,o){return o.startsWith("/")?"["+o+"]"+p:o.endsWith("/")?s+"["+o+"]"+p:s+"["+o+"]"});return w},l=()=>{e.livewire____grapesjs||(e.livewire____grapesjs=grapesjs.init({container:e,storageManager:!1,style:t.dataGet(r.$wire,"data.css"),components:t.dataGet(r.$wire,"data.content"),...a,plugins:g.map(function(i){return i.name}),pluginsOpts:g.reduce(function(i,s){return i[s.name]=s.options??{},i},{}),pages:!1,assetManager:{custom:{open(i){window.showFileManager(function(s){console.log(s[0].url),i.select(s[0].url),i.close()})},close(i){}}}}),e.livewire____grapesjs.Commands.add("sokeio-builder-save-data",{run:async function(i,s){s&&s.set("active",0),r.$wire.doSave()}}),e.livewire____grapesjs.on("change",function(){t.dataSet(r.$wire,"data.css",e.livewire____grapesjs.getCss()),t.dataSet(r.$wire,"data.content",_(e.livewire____grapesjs.getHtml())),t.dataSet(r.$wire,"data.js",e.livewire____grapesjs.getJs())}),e.livewire____grapesjs.on("load",function(){const i=c(t.dataGet(r.$wire,"data.content"));e.livewire____grapesjs.setComponents(i)}),e.livewire____grapesjs.on("stop:preview",()=>{e.closest(".sokeio-builder-manager").classList.remove("sokeio-builder-preview")}),e.livewire____grapesjs.on("run:preview",()=>{e.closest(".sokeio-builder-manager").classList.add("sokeio-builder-preview")}))};window.grapesjs?l():(window.SokeioLoadStyle("https://cdn.jsdelivr.net/npm/grapesjs@0.21.6/dist/css/grapes.min.css",...g.reduce(function(i,s){return[...i,...s.css??[]]},[])),window.SokeioLoadScript(["https://cdn.jsdelivr.net/npm/grapesjs@0.21.6/dist/grapes.min.js",...g.reduce(function(i,s){return[...i,...s.js??[]]},[])]).then(function(){l()}))})}}}window.addEventListener("sokeio::register",function(){SokeioManager.registerPlugin(m)}); 2 | -------------------------------------------------------------------------------- /platform/modules/builder_old/public/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources/js/app.js": { 3 | "file": "assets/app-5aa2def9.js", 4 | "isEntry": true, 5 | "src": "resources/js/app.js" 6 | }, 7 | "resources/sass/app.scss": { 8 | "file": "assets/app-50e139b7.css", 9 | "isEntry": true, 10 | "src": "resources/sass/app.scss" 11 | } 12 | } -------------------------------------------------------------------------------- /platform/modules/builder_old/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Stop hacker!. 4 | 5 | 6 |

Stop hacker!.

7 |

Thanks for you.

8 | 9 | -------------------------------------------------------------------------------- /platform/modules/builder_old/public/template/hero0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/public/template/hero0.jpg -------------------------------------------------------------------------------- /platform/modules/builder_old/public/template/hero1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/public/template/hero1.jpg -------------------------------------------------------------------------------- /platform/modules/builder_old/public/template/hero2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/public/template/hero2.jpg -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/resources/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/js/app.js: -------------------------------------------------------------------------------- 1 | import { LiveWireGrapesJSModule } from "./modules/livewire-grapesjs"; 2 | 3 | window.addEventListener("sokeio::register", function () { 4 | SokeioManager.registerPlugin(LiveWireGrapesJSModule); 5 | }); 6 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/js/core/plugin.js: -------------------------------------------------------------------------------- 1 | export class SokeioPlugin { 2 | _manager; 3 | getKey() { 4 | return ""; 5 | } 6 | manager(manager) { 7 | this._manager = manager; 8 | } 9 | getManager() { 10 | return this._manager; 11 | } 12 | register() {} 13 | booting() {} 14 | booted() {} 15 | dispose() {} 16 | } 17 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/lang/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/resources/lang/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/lang/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "Create With Builder": "Create With Builder", 3 | "Edit With Builder": "Edit With Builder", 4 | "Builder Manager": "Builder Manager", 5 | "Template": "Template", 6 | "Plugin": "Plugin", 7 | "Post": "Post", 8 | "Content": "Content", 9 | "Title": "Title", 10 | "Slug": "Slug", 11 | "Status": "Status", 12 | "Draft": "Draft", 13 | "Published": "Published", 14 | "Image": "Image", 15 | "Category": "Category", 16 | "Tags": "Tags", 17 | "Layout": "Layout", 18 | "Default": "Default", 19 | "None": "None", 20 | "Description": "Description", 21 | "Custom Js": "Custom Js", 22 | "Custom CSS": "Custom CSS", 23 | "Save article": "Save article", 24 | "Page": "Page", 25 | "Published At": "Published At", 26 | "Builder Plugin": "Builder Plugin", 27 | "Name": "Name", 28 | "JS": "JS", 29 | "CSS": "CSS", 30 | "Options": "Options", 31 | "Active": "Active", 32 | "Block": "Block", 33 | "Builder Template": "Builder Template", 34 | "Thumbnail": "Thumbnail", 35 | "Topic": "Topic", 36 | "Only me": "Only me", 37 | "Only me use this template": "Only me use this template", 38 | "Email": "Email", 39 | "Remove": "Remove", 40 | "Do you want to delete this record?": "Do you want to delete this record?", 41 | "Blocks": "Blocks", 42 | "Templates": "Templates", 43 | "Settings": "Settings" 44 | } -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | @import './builder.scss'; -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/features/features0.blade.php: -------------------------------------------------------------------------------- 1 | 10 | 17 | 61 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/features/features1.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |

Hanging icons

12 |
13 |
14 |
15 | 16 |
17 |
18 |

Featured title

19 |

Paragraph of text beneath the heading to explain the heading. We'll add onto it with another sentence and probably just keep going until we run out of words.

20 | 21 | Primary button 22 | 23 |
24 |
25 |
26 |
27 | 28 |
29 |
30 |

Featured title

31 |

Paragraph of text beneath the heading to explain the heading. We'll add onto it with another sentence and probably just keep going until we run out of words.

32 | 33 | Primary button 34 | 35 |
36 |
37 |
38 |
39 | 40 | 41 |
42 |
43 |

Featured title

44 |

Paragraph of text beneath the heading to explain the heading. We'll add onto it with another sentence and probably just keep going until we run out of words.

45 | 46 | Primary button 47 | 48 |
49 |
50 |
51 |
-------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/features/features2.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |

Custom cards

12 | 13 |
14 |
15 |
17 |
18 |

Short title, long jacket

19 |
    20 |
  • 21 | Bootstrap 23 |
  • 24 |
  • 25 | 26 | Earth 27 |
  • 28 |
  • 29 | 30 | 3d 31 |
  • 32 |
33 |
34 |
35 |
36 | 37 |
38 |
40 |
41 |

Much longer title that wraps to multiple lines 42 |

43 |
    44 |
  • 45 | Bootstrap 47 |
  • 48 |
  • 49 | 50 | Pakistan 51 |
  • 52 |
  • 53 | 54 | 4d 55 |
  • 56 |
57 |
58 |
59 |
60 | 61 |
62 |
64 |
65 |

Another longer title belongs here

66 |
    67 |
  • 68 | Bootstrap 70 |
  • 71 |
  • 72 | 73 | California 74 |
  • 75 |
  • 76 | 77 | 5d 78 |
  • 79 |
80 |
81 |
82 |
83 |
84 |
85 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/features/features3.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |

Icon grid

12 | 13 |
14 |
15 | 16 |
17 |

Featured title

18 |

Paragraph of text beneath the heading to explain the heading.

19 |
20 |
21 |
22 | 23 |
24 |

Featured title

25 |

Paragraph of text beneath the heading to explain the heading.

26 |
27 |
28 |
29 | 30 |
31 |

Featured title

32 |

Paragraph of text beneath the heading to explain the heading.

33 |
34 |
35 |
36 | 37 |
38 |

Featured title

39 |

Paragraph of text beneath the heading to explain the heading.

40 |
41 |
42 |
43 | 44 |
45 |

Featured title

46 |

Paragraph of text beneath the heading to explain the heading.

47 |
48 |
49 |
50 | 51 |
52 |

Featured title

53 |

Paragraph of text beneath the heading to explain the heading.

54 |
55 |
56 |
57 | 58 |
59 |

Featured title

60 |

Paragraph of text beneath the heading to explain the heading.

61 |
62 |
63 |
64 | 65 |
66 |

Featured title

67 |

Paragraph of text beneath the heading to explain the heading.

68 |
69 |
70 |
71 |
72 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/features/features4.blade.php: -------------------------------------------------------------------------------- 1 | 10 | 16 |
17 |

Features with title

18 |
19 |
20 |

Left-aligned title explaining these awesome features

21 |

Paragraph of text beneath the heading to explain the heading. We'll add onto it with 22 | another sentence and probably just keep going until we run out of words.

23 | Primary button 24 |
25 |
26 |
27 |
29 | 30 | 31 | 32 |
33 |

Featured title

34 |

Paragraph of text beneath the heading to explain the heading.

35 |
36 | 37 |
38 |
40 | 41 | 42 | 43 |
44 |

Featured title

45 |

Paragraph of text beneath the heading to explain the heading.

46 |
47 | 48 |
49 |
51 | 52 | 53 | 54 |
55 |

Featured title

56 |

Paragraph of text beneath the heading to explain the heading.

57 |
58 | 59 |
60 |
62 | 63 | 64 | 65 |
66 |

Featured title

67 |

Paragraph of text beneath the heading to explain the heading.

68 |
69 |
70 |
71 |
72 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/footers/footer0.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 | 26 |
-------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/footers/footer1.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 |
13 | 14 | 15 | 16 | © 2022 Company, Inc 17 |
18 | 19 | 24 |
25 |
-------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/footers/footer2.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 | 21 |
-------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/footers/footer3.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 | 56 |
-------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/footers/footer4.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 |
13 |
14 |
Section
15 | 22 |
23 | 24 |
25 |
Section
26 | 33 |
34 | 35 |
36 |
Section
37 | 44 |
45 | 46 |
47 |
48 |
Subscribe to our newsletter
49 |

Monthly digest of what's new and exciting from us.

50 |
51 | 52 | 53 | 54 |
55 |
56 |
57 |
58 | 59 |
60 |

© 2022 Company, Inc. All rights reserved.

61 | 62 |
    63 |
  • 65 |
  • 67 |
  • 69 |
70 |
71 |
72 |
73 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/headers/header0.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 | 13 | 14 | Simple header 15 | 16 | 23 |
24 |
25 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/headers/header1.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 | 19 |
20 |
-------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/headers/header2.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 23 | 24 |
25 | 26 | 27 |
28 |
29 |
-------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/headers/header3.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 |
13 | 14 | 15 | 16 | 17 | 24 | 25 | 28 | 29 |
30 | 31 | 32 |
33 |
34 |
35 |
-------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/headers/header4.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 |
13 | 14 | 15 | 16 | 17 | 23 | 24 | 27 | 28 | 40 |
41 |
42 |
-------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/headers/header5.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 | 26 | 27 |
28 | 31 | 32 | 44 |
45 |
46 |
47 |
48 |
49 |
50 |









51 |
52 |
53 |









54 |
55 |
56 |
-------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/headers/header6.blade.php: -------------------------------------------------------------------------------- 1 | 10 | 25 |
26 |
27 | 28 | 29 | Double header 30 | 31 | 34 |
35 |
36 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/headers/header7.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 | 64 |
65 |
66 | 69 | 70 |
71 | 72 | 73 |
74 |
75 |
76 |
77 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/heros/hero0.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 | 13 |

Centered hero

14 |
15 |

Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most 16 | popular front-end open source toolkit, featuring Sass variables and mixins, responsive grid system, 17 | extensive prebuilt components, and powerful JavaScript plugins.

18 |
19 | 20 | 21 |
22 |
23 |
24 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/heros/hero1.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 |
13 |

Vertically centered hero sign-up form

14 |

Below is an example form built entirely with Bootstrap’s form controls. Each required form group has a validation state that can be triggered by attempting to submit the form without completing it.

15 |
16 |
17 |
18 |
19 | 20 | 21 |
22 |
23 | 24 | 25 |
26 |
27 | 30 |
31 | 32 |
33 | By clicking Sign up, you agree to the terms of use. 34 |
35 |
36 |
37 |
-------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/heros/hero2.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 |
13 | Bootstrap Themes 14 |
15 |
16 |

Responsive left-aligned hero with image

17 |

Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featuring Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful JavaScript plugins.

18 |
19 | 20 | 21 |
22 |
23 |
24 |
-------------------------------------------------------------------------------- /platform/modules/builder_old/resources/template-builders/pages/cover.blade.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 |
13 |

Cover

14 | 19 |
20 |
21 | 22 |
23 |

Cover your page.

24 |

Cover is a one-page template for building simple and beautiful home pages. Download, edit the 25 | text, and add your own fullscreen background photo to make it your own.

26 |

27 | Learn more 28 |

29 |
30 | 31 | 35 |
36 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/views/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/resources/views/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/views/components/builder.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
30 |
31 | @foreach ($tabs as $key => $item) 32 |
35 | {!! $item['icon'] !!} 36 |
37 | @endforeach 38 | 39 |
40 |
41 | @foreach ($tabs as $key => $item) 42 | @if (isset($item['template']) && $item['template'] == true) 43 | 46 | @else 47 |
48 | @includeIf($item['view'], $item['data'] ?? []) 49 |
50 | @endif 51 | @endforeach 52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
62 | Style 63 |
64 |
66 | Selector 67 |
68 |
70 | Setting 71 |
72 |
74 | Outline 75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/views/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends(themeLayout()) 2 | 3 | @section('content') 4 |

Hello World

5 | 6 |

7 | This view is loaded from module: {!! config('$LOWER_NAME$.name') !!} 8 |

9 | @endsection 10 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/views/tabs/block.blade.php: -------------------------------------------------------------------------------- 1 |
2 |

Block Manager

3 |
4 |
5 |
6 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/views/tabs/seo.blade.php: -------------------------------------------------------------------------------- 1 |
2 |

SEO Setting

3 |
4 | @if($form->seo_id) 5 | @livewire('admin::seo-box', ['dataId' => $form->seo_id]) 6 | @endif 7 |
8 |
9 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/views/tabs/setting.blade.php: -------------------------------------------------------------------------------- 1 |
2 |

Page Setting

3 |
4 |
5 | @includeIf('sokeio::components.layout', ['layout' => $layout]) 6 | @includeIf('sokeio::components.layout', ['layout' => $footer]) 7 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/views/tabs/template.blade.php: -------------------------------------------------------------------------------- 1 |
2 |

Template Manager

3 |
35 | 36 |
37 | 59 |
60 | 61 |
62 |
63 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/views/template-manager/index.blade.php: -------------------------------------------------------------------------------- 1 | 90 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/views/template-manager/item.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 7 | 16 | 19 | 22 | 25 | 28 |
29 | -------------------------------------------------------------------------------- /platform/modules/builder_old/resources/views/template/index.blade.php: -------------------------------------------------------------------------------- 1 |
2 | xin chào 3 |
-------------------------------------------------------------------------------- /platform/modules/builder_old/routes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/routes/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/routes/admin.php: -------------------------------------------------------------------------------- 1 | 'admin.', 12 | ], function () { 13 | Route::post('template-manager', TemplateManager::class)->name('builder.template-manager'); 14 | routeCrud('builder-plugin', PluginTable::class, PluginForm::class); 15 | routeCrud('builder-template', TemplateTable::class, TemplateForm::class, true); 16 | }); 17 | -------------------------------------------------------------------------------- /platform/modules/builder_old/routes/api.php: -------------------------------------------------------------------------------- 1 | get('/builder', function (Request $request) { 18 | return $request->user(); 19 | }); -------------------------------------------------------------------------------- /platform/modules/builder_old/routes/web.php: -------------------------------------------------------------------------------- 1 | name('builder') 27 | ->hasConfigFile() 28 | ->hasViews() 29 | ->hasHelpers() 30 | ->hasAssets() 31 | ->hasTranslations() 32 | ->runsMigrations(); 33 | } 34 | public function packageRegistered() 35 | { 36 | DataInfo::macro('getTemplateBuilder', function () { 37 | $path = $this->getPath('resources/template-builders'); 38 | if (File::exists($path) && $files = collect(File::allFiles($path))->map(function ($item) { 39 | return $item->getPathname(); 40 | })) { 41 | return $files; 42 | } 43 | return []; 44 | }); 45 | } 46 | private function bootGate() 47 | { 48 | if (!$this->app->runningInConsole()) { 49 | addFilter(PLATFORM_PERMISSION_CUSTOME, function ($prev) { 50 | return [ 51 | ...$prev 52 | ]; 53 | }); 54 | } 55 | } 56 | public function packageBooted() 57 | { 58 | $this->bootGate(); 59 | Platform::ready(function () { 60 | if (sokeioIsAdmin()) { 61 | Menu::Register(function () { 62 | menuAdmin()->subMenu(__('Builder Manager'), '', function (MenuBuilder $menu) { 63 | $menu->route( 64 | ['name' => 'admin.builder-template', 'params' => []], 65 | __('Template'), 66 | '', 67 | [], 68 | 'admin.builder-template' 69 | ); 70 | $menu->route( 71 | ['name' => 'admin.builder-plugin', 'params' => []], 72 | __('Plugin'), 73 | '', 74 | [], 75 | 'admin.builder-plugin' 76 | ); 77 | }, 1000); 78 | }); 79 | } 80 | }); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /platform/modules/builder_old/src/Commands/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/src/Commands/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/src/Http/Controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/src/Http/Controllers/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/src/Http/Middleware/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/src/Http/Middleware/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/src/Http/Requests/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/src/Http/Requests/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/src/Livewire/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/modules/builder_old/src/Livewire/.gitkeep -------------------------------------------------------------------------------- /platform/modules/builder_old/src/Livewire/Plugin/PluginForm.php: -------------------------------------------------------------------------------- 1 | label(__('Name'))->required(), 23 | UI::textarea('js')->label(__('JS'))->valueDefault('[]')->required()->regexArray(), 24 | UI::textarea('css')->label(__('CSS'))->valueDefault('[]')->required()->regexArray(), 25 | UI::textarea('options')->label(__('Options'))->valueDefault('[]')->required()->regexArray(), 26 | UI::checkBox('is_active')->label(__('Active'))->title(__('Active'))->valueDefault(1)->required() 27 | ])->className('p-2'); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /platform/modules/builder_old/src/Livewire/Plugin/PluginTable.php: -------------------------------------------------------------------------------- 1 | getQuery()->where('id', $id)->update(['is_active' => $status]); 26 | } 27 | protected function getColumns() 28 | { 29 | return [ 30 | UI::text('name')->label(__('Name')), 31 | UI::textarea('js')->label(__('JS'))->valueDefault('[]'), 32 | UI::textarea('css')->label(__('CSS'))->valueDefault('[]'), 33 | UI::textarea('options')->label(__('Options'))->valueDefault('[]'), 34 | UI::button('is_active')->label(__('Active'))->title(__('Active'))->NoSort()->wireClick(function ($item) { 35 | if ($item->getDataItem()->is_active === true) { 36 | $item->title(__('Active')); 37 | $item->primary(); 38 | } else { 39 | $item->title(__('Block')); 40 | $item->warning(); 41 | } 42 | return 'doChangeStatus(' . $item->getDataItem()->id . ',' . ($item->getDataItem()->status === true ? 0 : 1) . ')'; 43 | }) 44 | ]; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /platform/modules/builder_old/src/Livewire/Template/TemplateForm.php: -------------------------------------------------------------------------------- 1 | valueDefault(function () { 28 | return auth()->user()->id; 29 | }), 30 | UI::hidden('content')->valueDefault(''), 31 | UI::text('name')->label(__('Name'))->required(), 32 | UI::image('thumbnail')->label(__('Thumbnail'))->valueDefault(''), 33 | UI::text('category')->label(__('Category'))->valueDefault('common')->required(), 34 | UI::text('topic')->label(__('Topic'))->required(), 35 | UI::textarea('description')->label(__('Description'))->valueDefault(''), 36 | UI::checkBox('only_me')->label(__('Only me'))->title(__('Only me use this template'))->valueDefault(0), 37 | UI::text('email')->label(__('Email')), 38 | UI::select('status')->label(__('Status'))->dataSource(function () { 39 | return [ 40 | [ 41 | 'id' => 'draft', 42 | 'name' => __('Draft') 43 | ], 44 | [ 45 | 'id' => 'published', 46 | 'name' => __('Published') 47 | ] 48 | ]; 49 | })->valueDefault('published'), 50 | ]); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /platform/modules/builder_old/src/Livewire/Template/TemplateTable.php: -------------------------------------------------------------------------------- 1 | route($this->getRoute() . '.add') 27 | ]; 28 | } 29 | 30 | //The record has been deleted successfully. 31 | protected function getTableActions() 32 | { 33 | return [ 34 | UI::buttonEdit(__('Edit With Builder'))->route($this->getRoute() . '.edit', function ($row) { 35 | return [ 36 | 'dataId' => $row->id 37 | ]; 38 | }), 39 | UI::buttonRemove(__('Remove'))->confirm(__('Do you want to delete this record?'), 'Confirm')->wireClick(function ($item) { 40 | return 'doRemove(' . $item->getDataItem()->id . ')'; 41 | }) 42 | ]; 43 | } 44 | protected function getQuery() 45 | { 46 | return parent::getQuery()->Where(function ($query) { 47 | $query->orWhere('only_me', 0); 48 | $query->orWhere(function ($subQuery) { 49 | $subQuery->where('only_me', true); 50 | $subQuery->Where('author_id', auth()->user()->id); 51 | }); 52 | }); 53 | } 54 | public function doChangeStatus($id, $status) 55 | { 56 | $this->getQuery()->where('id', $id)->update(['is_active' => $status]); 57 | } 58 | protected function getColumns() 59 | { 60 | return [ 61 | UI::text('name')->label(__('Name')), 62 | UI::text('Category')->label(__('Category')), 63 | UI::text('topic')->label(__('Topic')), 64 | UI::text('only_me')->label(__('Only me'))->valueDefault(0)->NoSort(), 65 | 66 | ]; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /platform/modules/builder_old/src/Livewire/TemplateManager.php: -------------------------------------------------------------------------------- 1 | callbackEvent = request('callbackEvent'); 14 | } 15 | public function getTemplates() 16 | { 17 | $this->skipRender(); 18 | return TemplateBuilder::getTemplates(); 19 | } 20 | public function render() 21 | { 22 | return view('builder::template-manager.index', []); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /platform/modules/builder_old/src/Models/BuilderPlugin.php: -------------------------------------------------------------------------------- 1 | 'boolean' 12 | ]; 13 | } 14 | -------------------------------------------------------------------------------- /platform/modules/builder_old/src/Models/BuilderTemplate.php: -------------------------------------------------------------------------------- 1 | 'boolean' 13 | ]; 14 | public function author() 15 | { 16 | return $this->belongsTo(User::class, 'author_id'); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /platform/modules/builder_old/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import laravel from "laravel-vite-plugin2"; 3 | 4 | export default defineConfig({ 5 | plugins: [laravel(["resources/js/app.js", "resources/sass/app.scss"])], 6 | build: { 7 | target: "esnext", 8 | }, 9 | }); 10 | -------------------------------------------------------------------------------- /platform/status.json: -------------------------------------------------------------------------------- 1 | {"theme":{"659d7f82e78a57e74a98ecc10ec940ef":{"status":true}}} -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | node_modules/ 3 | npm-debug.log 4 | yarn-error.log -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sokeio/theme-websitebuilder", 3 | "description": "", 4 | "authors": [ 5 | { 6 | "name": "Nguyen Van Hau", 7 | "email": "nguyenvanhaudev@gmail.com" 8 | } 9 | ], 10 | "extra": { 11 | "laravel": { 12 | "providers": ["Sokeio\\Theme\\WebsiteBuilder\\WebsiteBuilderServiceProvider"], 13 | "aliases": {} 14 | } 15 | }, 16 | "autoload": { 17 | "files": [ 18 | "helpers/constraint.php", 19 | "helpers/function.php" 20 | ], 21 | "psr-4": { 22 | "Sokeio\\Theme\\WebsiteBuilder\\": "src", 23 | "Sokeio\\Theme\\WebsiteBuilder\\Database\\Factories\\": "database/factories", 24 | "Sokeio\\Theme\\WebsiteBuilder\\Database\\Seeders\\": "database/seeders" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/config/websitebuilder.php: -------------------------------------------------------------------------------- 1 | 'WebsiteBuilder', 5 | 'commands' => [] 6 | ]; 7 | -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/helpers/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/helpers/constraint.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Stop hacker!. 4 | 5 | 6 |

Stop hacker!.

7 |

Thanks for you.

8 | 9 | -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/resources/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/js/app.js: -------------------------------------------------------------------------------- 1 | console.log('hello'); -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/lang/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/resources/lang/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | .test{display:none;} -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/views/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/resources/views/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/views/common/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/resources/views/common/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/views/errors/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/resources/views/errors/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/views/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends(themeLayout()) 2 | 3 | @section('content') 4 |

Hello World

5 | 6 |

7 | This view is loaded from module: {!! config('$LOWER_NAME$.name') !!} 8 |

9 | @endsection 10 | -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/views/layouts/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/resources/views/layouts/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/views/layouts/default.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @themeHead 5 | 6 | 7 | 8 | @themeBody 9 | @yield('content') 10 | @themeBodyEnd 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/views/layouts/layout.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @themeHead 5 | 6 | 7 | 8 | @themeBody 9 | @yield('content') 10 | @themeBodyEnd 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/views/layouts/none.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @themeHead 5 | 6 | 7 | 8 | @themeBody 9 | @yield('content') 10 | @themeBodyEnd 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/views/pages/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/resources/views/pages/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/views/scope/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/resources/views/scope/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/views/shared/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/resources/views/shared/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/views/shared/footer.blade.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/resources/views/shared/footer.blade.php -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/resources/views/shared/header.blade.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/resources/views/shared/header.blade.php -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/routes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/routes/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/src/Http/Controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/src/Http/Controllers/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/src/Http/Middleware/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/src/Http/Middleware/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/src/Http/Requests/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/src/Http/Requests/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/src/Http/Services/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/src/Http/Services/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/src/Livewire/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/src/Livewire/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/src/Models/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/src/Models/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/src/Option.php: -------------------------------------------------------------------------------- 1 | name('websitebuilder') 23 | ->hasConfigFile() 24 | ->hasViews() 25 | ->hasHelpers() 26 | ->hasAssets() 27 | ->hasTranslations() 28 | ->runsMigrations(); 29 | } 30 | public function packageRegistered() 31 | { 32 | // packageRegistered 33 | } 34 | 35 | public function packageBooted() 36 | { 37 | // packageBooted 38 | if (!Platform::isUrlAdmin()) { 39 | Theme::linkJs( 40 | url('platform/module/sokeio/tabler/js/tabler.min.js'), 41 | 'https://cdn.jsdelivr.net/npm/@tabler/core@1.0.0-beta20/dist/js/tabler.min.js' 42 | ); 43 | Theme::linkCss( 44 | url('platform/module/sokeio/tabler/css/tabler.min.css'), 45 | 'https://cdn.jsdelivr.net/npm/@tabler/core@1.0.0-beta20/dist/css/tabler.min.css' 46 | ); 47 | Theme::linkCss( 48 | url('platform/module/sokeio/tabler-icons/tabler-icons.min.css'), 49 | 'https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@3.14.0/tabler-icons.min.css' 50 | ); 51 | Theme::linkCss( 52 | url('platform/module/sokeio/bootstrap-icons/bootstrap-icons.min.css') 53 | ); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/src/Widget/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/platform/theme/WebsiteBuilder/src/Widget/.gitkeep -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "sokeio-theme-websitebuilder", 3 | "name": "Website Builder", 4 | "version": "v1.0.0", 5 | "alias": "websitebuilder", 6 | "description": "", 7 | "keywords": [], 8 | "priority": 200, 9 | "aliases": {}, 10 | "namespace": "Sokeio\\Theme\\WebsiteBuilder", 11 | "tailwindcss": { 12 | "enable": false, 13 | "inline": true, 14 | "obfuscator": true, 15 | "cdn": "https://cdn.tailwindcss.com", 16 | "plugins": [ 17 | "forms", 18 | "typography", 19 | "aspect-ratio", 20 | "line-clamp", 21 | "container-queries" 22 | ] 23 | }, 24 | "templates": [], 25 | "locations": [], 26 | "layouts": { 27 | "default": "Theme Default" 28 | }, 29 | "requires": [] 30 | } 31 | -------------------------------------------------------------------------------- /platform/theme/WebsiteBuilder/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin2'; 3 | 4 | export default defineConfig({ 5 | plugins: [ 6 | laravel([ 7 | 'resources/js/app.js', 8 | 'resources/sass/app.scss', 9 | ]), 10 | ] 11 | }); -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sokeio/website-builder/bc129efb5d5e459163918537bd4bee9a4d401bff/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | handleRequest(Request::capture()); 18 | -------------------------------------------------------------------------------- /public/platform/module/sokeio: -------------------------------------------------------------------------------- 1 | /Users/user/Desktop/mywork/sokeio/packages/website-builder/vendor/sokeio/framework/public -------------------------------------------------------------------------------- /public/platform/module/sokeio-page: -------------------------------------------------------------------------------- 1 | /Users/user/Desktop/mywork/sokeio/packages/website-builder/vendor/sokeio/page/public -------------------------------------------------------------------------------- /public/platform/theme/admin: -------------------------------------------------------------------------------- 1 | /Users/user/Desktop/mywork/sokeio/packages/website-builder/vendor/sokeio/framework/theme/admin/public -------------------------------------------------------------------------------- /public/platform/theme/site: -------------------------------------------------------------------------------- 1 | /Users/user/Desktop/mywork/sokeio/packages/website-builder/platform/theme/WebsiteBuilder/public -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap'; 2 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | window.axios = axios; 3 | 4 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 5 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 8 | })->purpose('Display an inspiring quote')->hourly(); 9 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | get('/'); 16 | 17 | $response->assertStatus(200); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "builds": [ 4 | { "src": "/api/index.php", "use": "vercel-php@0.7.3" }, 5 | { "src": "/public/**", "use": "@vercel/static" } 6 | ], 7 | "routes": [ 8 | { 9 | "src": "/(Platform|storage)/(.*)", 10 | "dest": "public/$1/$2" 11 | }, 12 | { 13 | "src": "/(.*)", 14 | "dest": "/api/index.php" 15 | } 16 | ], 17 | "env": { 18 | "APP_CONFIG_CACHE": "/tmp/config.php", 19 | "APP_EVENTS_CACHE": "/tmp/events.php", 20 | "APP_PACKAGES_CACHE": "/tmp/packages.php", 21 | "APP_ROUTES_CACHE": "/tmp/routes.php", 22 | "APP_SERVICES_CACHE": "/tmp/services.php", 23 | "VIEW_COMPILED_PATH": "/tmp", 24 | 25 | "CACHE_DRIVER": "array", 26 | "LOG_CHANNEL": "stderr", 27 | "SESSION_DRIVER": "cookie" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin'; 3 | 4 | export default defineConfig({ 5 | plugins: [ 6 | laravel({ 7 | input: ['resources/css/app.css', 'resources/js/app.js'], 8 | refresh: true, 9 | }), 10 | ], 11 | }); 12 | --------------------------------------------------------------------------------