Proyecto MVC

QuestionsProyecto MVC
Rufino asked 1 month ago

Tengo un proyecto MVC y requiro integrar grid, para integrarlo tambien se debe realizar tal y como se muestra en la documentacion:

include_once(“../../config.php”);

// include and create object

include(PHPGRID_LIBPATH.”inc/jqgrid_dist.php”);

$db_conf = array(

“type” => PHPGRID_DBTYPE,

“server” => PHPGRID_DBHOST,

“user” => PHPGRID_DBUSER,

“password” => PHPGRID_DBPASS,

“database” => PHPGRID_DBNAME

);

$g = new jqgrid($db_conf);

o se integra de otra forma porque al realizarlo de esta manera en un controlador me marca el error que no encuentra la clase jqgrid

Uncaught Error: Class “Controllers\Comercial\jqgrid” not found

1 Answers
Abu Ghufran Staff answered 1 month ago

If the path of the jqgrid_dist.php is corrrect, you can try appending root namespace \ before jqgrid():

$g = new \jqgrid($db_conf);

I don’t know which MVC you are using, however you can also check this laravel guide and take help:

Laravel DataGrid Guide

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

4 + 16 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?