1. #1
    Sencha Premium Member
    Join Date
    Mar 2010
    Posts
    111
    Vote Rating
    -1
    predator has a little shameless behaviour in the past

      0  

    Thumbs up Laravel 4 direct service provider


  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,083
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Thank you for the information. I am sure it will be useful.

  3. #3
    Sencha User
    Join Date
    Sep 2014
    Posts
    0
    Vote Rating
    0
    jfusion is on a distinguished road

      0  

    Default Uncaught TypeError: Cannot read property 'directCfg' of undefined

    Uncaught TypeError: Cannot read property 'directCfg' of undefined


    Hello predator

    Thank you for adapting laravel to ext.direct
    I'm new to extJS and I need to create an API with laravel.

    To try it out, I chose the direct_grid_pt1 velociraptor example
    http://docs.sencha.com/extjs/4.1.3/#...irect_grid_pt1

    Following Error is shown
    Uncaught TypeError: Cannot read property 'directCfg' of undefined

    This is the code of the app
    Code:
    Ext.require([
        'Ext.direct.*',
        'Ext.data.*',
        'Ext.grid.*'
    ]);
    Ext.define('PersonalInfo', {
        extend: 'Ext.data.Model',
        fields: ['id', 'name', 'address', 'state']
    });
    Ext.onReady(function () {
        //add a provider to our grid
        Ext.direct.Manager.addProvider(Ext.rpc.REMOTING_API);
    
        // create the Grid
        Ext.create('Ext.grid.Panel', {
            store: {
                model: 'PersonalInfo',
                autoLoad: true,
                proxy: {
                    type: 'direct',
                    directFn: Ext.rpc.Velocis.getResults
                }
            },
            columns: [{
                    dataIndex: 'id',
                    width: 50,
                    text: 'ID'
                }, {
                    dataIndex: 'name',
                    flex: 1,
                    text: 'Name'
                }, {
                    dataIndex: 'address',
                    flex: 1.3,
                    text: 'Address'
                }, {
                    dataIndex: 'state',
                    flex: 1,
                    text: 'State'
                }],
            height: 450,
            width: 700,
            title: 'Velociraptor Owners',
            renderTo: Ext.getBody()
        });
    });
    This is the JavaScript that is generated by the Laravel 4 direct service provider:
    Code:
    if (Ext.syncRequire)
        Ext.syncRequire('Ext.direct.Manager');
    Ext.namespace('Ext.rpc');
    Ext.rpc.REMOTING_API = {
        "url": "http:\/\/extdirect-cors.local\/rpc?javascript",
        "type": "remoting",
        "timeout": 30,
        "namespace": "Ext.rpc",
        "descriptor": "Ext.rpc.REMOTING_API",
        "actions": {
            "Velocis": [{"name": "index", "len": 0}]
        }
    };
    Ext.Direct.addProvider(Ext.rpc.REMOTING_API);
    What am I missing? Any hints could help.

    Thank you very much!

Thread Participants: 2

Tags for this Thread