Closed tarunhere closed 7 years ago
Have you seen the turorials, there aren't too many differences with Laravel 5.
yes I tried. I got confused with Repository Part. I haven't used before. Can you guide me in detailed steps. Thanks in advance.
@mgallegos I'm having the exact same problem than you. I have created an app/ModelnameRepository.php file (because there's no models folder in L5) and I have added the following code (adding a namespace declaration at the top):
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Mgallegos\LaravelJqgrid\Repositories\EloquentRepositoryAbstract;
class ExampleRepository extends EloquentRepositoryAbstract {
public function __construct(Model $Model) {
$this->Database = $Model;
$this->visibleColumns = array('col1','col2');
$this->orderBy = array(array('col1', 'desc'), array('col2','asc'));
}
}
I get the following error:
FatalErrorException in routes.php line 34:
Class 'ExampleRepository' not found
I tried to do a composer dump-autoload, but still no success. What's wrong in your opinion?
I was able to have this working by adding those lines at the top of the routes.php file:
use Mgallegos\LaravelJqgrid\Facades\GridEncoder;
use App\ExampleRepository;
use App\Example;
use Illuminate\Support\Facades\Input;
Is it compulsory to user Repositories to use jqgrid? I tried to Learn and implement repositories but now luck!
Can any one guide me in right direction to use jqgrid with laravel 5.2.? Thanks in advance.