hansschouten / laravel-pagebuilder Goto Github PK
View Code? Open in Web Editor NEWA drag and drop pagebuilder to manage pages in any Laravel project
Home Page: https://www.phpagebuilder.com
License: MIT License
A drag and drop pagebuilder to manage pages in any Laravel project
Home Page: https://www.phpagebuilder.com
License: MIT License
I know very short title.
So I installed it on a clean Laravel 7 system. admin is blank cant get a login screen
Than I thought maybe Laravel 5.8 will work so I did a clean install on this. However i am still getting a blank screen. The only thing that loads is the favicon.
No error just Page Not Found
Any ideas?
the block element can be fetched from the database . if the database will change the block content will be changed.
Hello World
I have the same problem here and the solution #41 doesn't work for me. With these prints, can you tell me if I'm doing something wrong?
good evening,
I have a project already started and running with Laravel 5.7.
I would like to give my users the possibility to create web pages through this page builder and therefore I would like to integrate this page builder into a specific controller of my project.
I tried to install it with the composer, but I can't edit the files to apply it only to a controller because they all files remain in the vendor folder and are not published in my project
Please PostgreSQL support
My Solution :)
phppagebuilder/src/Core/DB.php
if($config['driver'] == 'pgsql'){
$this->pdo = new PDO(
$config['driver'] . ':host=' . $config['host'] . ';dbname=' . $config['database'],
$config['username'],
$config['password'],
[PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
);
}else{
$this->pdo = new PDO(
$config['driver'] . ':host=' . $config['host'] . ';dbname=' . $config['database'] . ';charset=' . $config['charset'],
$config['username'],
$config['password'],
[PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
);
}
After installation on laravel 7 and 5.5 getting Page not found when i tried http://localhost:8000/admin/auth. I follow all steps but no success.
Hi hans, I'm getting the exception bellow after updating from v0.10.0 to v0.11.0
PDOException SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= '4'' at line 1
Help would be welcome.
Thanks
Some time ago i install it. But it does not work. Where is the complete documentation of this setup process. also it's admin url also not working in the laravel 7.25 version project.
Can you please help to setup this builder in Laraval 7.X
Hi, HansSchouten. I am pleasure your pagbuilder. and then how can I add the carousel function in your project.
hi again,
https://share.getcloudapp.com/P8uemELl
3)some suggestions:
a custom css/js panel would be great, also the possibility to save ready templates for reuse (not the same as blocks).. how would one do this?
regards
Based on the document of PHPageBuilder to use an already existing login feature, I would need to implement my phone create/editing/remove functions:
Disable the module
Do you already have admin login functionality in your project? Then you can disable the website manager module by setting use_website_manager to false in your config. Next, you use or implement the page create/edit/remove functionality in your project and then directly launch the pagebuilder. You can render the pagebuilder from your project by using the PHPageBuilder\Modules\GrapesJS\PageBuilder class.
However, I'm not sure what to do. I tried to do. I was thinking of doing the following:
Route::any(
'/pagebuilder/create', 'Backend\PageBuilder@create')->name(
'page.builder.create');
Afterwards, I would set the permission for the pagebuilder.
However, this didn't work.
hi again,
apparently css and other assets inside a theme are not loaded, also not in the demo..
<link href="<?= phpb_theme_asset('css/main.css') ?>" rel="stylesheet">
i cant also reach the file in browser..
tried like: domain.com/themes/demo/css/style.css and domain.com/themes/demo/public/css/style.css
i tried also to use the htaccess from your boilerplate, but no success :(
thanks
i have run below commands
Now you are able to login via /admin with admin and changethispassword (the admin URL and credentials can be changed in the pagebuilder config file).
after that i have crated test page while i am click on Edit button from list i am redirecting to pagebuilder page after that some time only loader coming and some time it's working fine while it's working fine but i am getting only Header in Blocks -> General section -> Header (Only) comming nothing else please see atteched screenshot. so please guide me for resolve this issue. Thanks in advance
It always return "Page not found". I have change all urls in config.
But it doesn't work.
Hi, Thanks for great package.
The reason we can override the pagebuilder and gjs config is so we can add our own gjs plugins easily.
For example there are 2 gjs plugins for basic elements:
https://github.com/kaoz70/grapesjs-blocks-bootstrap4
https://github.com/artf/grapesjs-preset-webpage
We can install those plugins into your pagebuilder package easily without modifying the src.
So we can add and modify the pagebuilder based on any plugins we want.
For example with "blocks bootstrap4" plugins we can add basic blocks like bs4 row, column, hero, image, etc. Which already inlined with your package cause its using bs4 as base theme.
Thanks.
DirectoryIterator::__construct(F:\4work\test\blog\themes/demo/blocks,F:\4work\test\blog\themes/demo/blocks): ������� �� ������ ����� �������� ���. (code: 3)
it is empty laravel 6 installation. Only php artisan serve command executed.
Can you help me?
Help me :(
image saved as [upload_url] / [image_public_id].[extension]
but image url display as [upload_url] / [image_public_id] / [original_file_name].[extension]
any suggestions?
Hi,
I try to install it on Laravel 7 with Auth UI,
I have the /admin access,
I have add a user with admin role wich is active on DataBase, but when i try to login with Username (or Mail?) and PW, it return always the false response...
i have made a php artisan migrate:fresh
Add the user manually
Could you please help me to solve that ?
full Error:
PDOException SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= '1'' at line 1 http://mydomain/admin/pages/1/build
I have used #8 issuecomment-625410309
to add your pagebuilder into my exististing app,
added created a page (filled only name, didn't know if data and layout should be filled)
i created than the button for the building route
http://mydomain/admin/pages/1/build
but then the error appears, what can i do about it?
thanks
Denis
Hello
I want to purchase pagebuilder with theme and need all functionality for drag and drop please guide me for purchase theme which i have to buy for get all drag and drop functionality.
and please let me know after purchase theme what to make change in my project so i can use your library in my project for Create Dynamic pages with drag and drop functionality.
Hello is it possible to generate an html file with the data from the database?
I have encountered an error while installing Laravel-Pagebuilder.
My laravel version is 8
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi
TypeError
Argument 1 passed to PHPageBuilder\PHPageBuilder::__construct() must be of the type array, null given, called in C:\directory\laravel\vendor\hansschouten\laravel-pagebuilder\src\ServiceProvider.php on line 43
at C:\directory\laravel\vendor\hansschouten\phpagebuilder\src\PHPageBuilder.php:47
43? * PHPageBuilder constructor.
44? *
45? * @param array $config configuration in the format defined in config/config.example.php
46? */
? 47? public function __construct(array $config)
48? {
49? if (session_status() === PHP_SESSION_NONE) {
50? session_start();
51? }
1 C:\directory\laravel\vendor\hansschouten\laravel-pagebuilder\src\ServiceProvider.php:43
PHPageBuilder\PHPageBuilder::__construct()
2 C:\directory\laravel\vendor\laravel\framework\src\Illuminate\Container\Container.php:805
HansSchouten\LaravelPageBuilder\ServiceProvider::HansSchouten\LaravelPageBuilder{closure}(Object(Illuminate\Foundation\Application), [])
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Installation failed, reverting ./composer.json to its original content.
installation not work screen are white... Not funny
I am integrating this package into a Laravel application that has a lot of routes and the reason the "use_router" value was set to false;
'router' => [
'class' => PHPageBuilder\Modules\Router\DatabasePageRouter::class,
'use_router' => false
],
I then added the route to my web.php file:
Route::get('/test1', 'TestController@index');
The following is the actual function call:
/**
*
*
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
$builder = new LaravelPageBuilder(config('pagebuilder'));
$builder->handlePublicRequest();
}
On going to the 'test1' route I am just getting a blank page. I have Debugbar installed and APP_DEBUG set to true but the Debugbar is not shown and there no errors displayed.
Hi I see in your example image that you already have blocks . Could you paste somewhere the source of that blocks(html and css) ? Also I would like to know how could I add an image over a block ? I see that each of your blocks have an image
I have written this code into config.php for block setting
`<?php
use App\Http\Controllers\backend\PageController;
$ctrl=new PageController();
$categories=$ctrl->getCategories();
return [
'title' => 'Banner',
'category' => 'Banner',
'icon' => 'fa fa-server',
"settings" => [
"first-section" => [
"type" => "select",
"label" => "Select First Block Category",
"options" =>$categories,
], `
Code in controller
public function getCategories()
{
$cats=DB::table('news_categories')->select('name')->get();
return $cats;
}
The output is
Why the option's value is undefined. Please help ..
Error when install on Laravel 6 - Php 7.3
Symfony\Component\Debug\Exception\FatalThrowableError : Argument 1 passed to PHPageBuilder\PHPageBuilder::__construct() must be of the type array, null given, called in E:\laragon\www\builder\vendor\hansschouten\laravel-pagebuilder\src\ServiceProvider.php on line 43
at E:\laragon\www\builder\vendor\hansschouten\phpagebuilder\src\PHPageBuilder.php:47
43| * PHPageBuilder constructor.
44| *
45| * @param array $config configuration in the format defined in config/config.example.php
46| */
47| public function __construct(array $config)
48| {
49| if (session_status() === PHP_SESSION_NONE) {
50| session_start();
51| }
Exception trace:
1 PHPageBuilder\PHPageBuilder::__construct()
E:\laragon\www\builder\vendor\hansschouten\laravel-pagebuilder\src\ServiceProvider.php:43
2 HansSchouten\LaravelPageBuilder\ServiceProvider::HansSchouten\LaravelPageBuilder{closure}(Object(Illuminate\Foundation\Application), [])
E:\laragon\www\builder\vendor\laravel\framework\src\Illuminate\Container\Container.php:799
Error: Undefined index: REQUEST_URI and Undefined index: SERVER_NAME in hansschouten\phpagebuilder\src\Core\helpers.php line 247
I changed line 247 to $currentFullUrl = $protocol . "://" . request()->server('SERVER_NAME') . $port . urldecode(request()->server('REQUEST_URI')); and it work
Hi,
i am trying to make it work in a saas app, i use stancl/tenancy for the tenant functionality..
after having same issue in #42
right know i have a white page, on builder.. i cant also to reach the webmanager for testing, but it also doesnt work.. but there is no error in logs.
i am overwriting the general.base_url
like this
config(['pagebuilder.general.base_url' => 'https://'.tenant()->domains[0]->domain]);
the right url is returned but still no luck :( to make it work..
Hi . I created a new laravel project by using this command composer create-project --prefer-dist laravel/laravel chat
and after I created the project I used the command composer require hansschouten/laravel-pagebuilder
and I get this error :
D:\xampp\htdocs\laravel\chat>composer require hansschouten/laravel-pagebuilder
Using version ^0.13.0 for hansschouten/laravel-pagebuilder
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Installing hansschouten/phpagebuilder (v0.13.0): Loading from cache
- Installing hansschouten/laravel-pagebuilder (v0.13.0): Loading from cache
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
TypeError
Argument 1 passed to PHPageBuilder\PHPageBuilder::__construct() must be of the type array, null given, called in D:\xampp\htdocs\laravel\chat\vendor\hansschouten\laravel-pagebuilder\src\ServiceProvider.php on line 43
at D:\xampp\htdocs\laravel\chat\vendor\hansschouten\phpagebuilder\src\PHPageBuilder.php:47
43▕ * PHPageBuilder constructor.
44▕ *
45▕ * @param array $config configuration in the format defined in config/config.example.php
46▕ */
➜ 47▕ public function __construct(array $config)
48▕ {
49▕ if (session_status() === PHP_SESSION_NONE) {
50▕ session_start();
51▕ }
1 D:\xampp\htdocs\laravel\chat\vendor\hansschouten\laravel-pagebuilder\src\ServiceProvider.php:43
PHPageBuilder\PHPageBuilder::__construct()
2 D:\xampp\htdocs\laravel\chat\vendor\laravel\framework\src\Illuminate\Container\Container.php:805
HansSchouten\LaravelPageBuilder\ServiceProvider::HansSchouten\LaravelPageBuilder\{closure}(Object(Illuminate\Foundation\Application), [])
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Installation failed, reverting ./composer.json to its original content.
Any idea how can I solve this issue ? Sorry if I made any newbie mistakes . I come from a Python(Flask) background and I've never worked with laravel. Would be great if you could make some videos about this content management system.
Thank you
I have created a block named section, view.php
<div class="row">
<div class="col-md-6" phpb-blocks-container>
</div>
<div class="col-md-6" phpb-blocks-container>
</div>
</div>
the another block is hello, view.php is
<p>Hello</p>
First I added section block then I want to add hello block inside section block , but it is not working properly.
The two hello block go two different row.
Hi,
Plz add Laravel 8 Support
Thanks
Hello @HansSchouten
I just follow this guide. And everything is working fine. But my old route Like 'http://example.test/my-admin/login' this route also handle by WebsiteController@uri method.
I just want some URL's to ignore to going that method.
Can you help me to do that
public function viewPage($pageId)
{
$data=DB::table('pagebuilder__pages')->where('id',$pageId)->value('data');
return $data;
}
I get the page data from the function, How can I render the data into blade?
HI, can you explain how to use routes? because all my route is going to phpagebuilder routes
I followed the instructions - installed on a new laravel project. But I keep getting a "Page not found" when trying to enter /admin page.
Also edited the pagebuilder.php - I'm I missing someting?:/
HI, can you update version for phpagebuilder? because in composer.json still require v0.2.0
can i edit the .php component no text can edit only if html
When trying to login to /admin, the "page not found" error appears.
Steps for playback:
At the first run, sometimes the /admin page opens, I enter my login and password, redirect me to /admin/auth and the "page not found" error appears.
Later on, even the /admin page shows an error.
They are used:
PHP 7.3.17
Laravel Framework 6.18.14
Windows 10 / Linux Mint 19.4 / Ubuntu 18.04 (same error everywhere)
in the Laravel Framework 7.11.0 the problem is the same
After taking a little look, I found out that the problem is possible in the function phpb_in_module( ) in helpers php
I just installed Laravel 6 + pagebuilder and to my surprise, it doesn't work because the themes and blocks were not created during the installation process, which causes an error even in /admin/auth
UnexpectedValueException
DirectoryIterator::__construct(/home/marcos/www/pagebuilders/laravel6-pagebuilder/themes/demo/blocks): failed to open dir: No such file or directory
Which file i need to change to make it work offline ? I want to work offline ( for testing ) because i have poor internet connectivity. I just want to use offline bootstrap from app.css and app.js.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.