DanielLaravel

DanielLaravel

Member Since 2 Years Ago

Experience Points 320
Experience Level 1

4,680 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 0
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

15 Jun
1 year ago

DanielLaravel left a reply on Vuejs + Laravel Axios Array Problem

I find out what was wrong,

I had two problems, one was my view tags variables, this is the right way since i need to loop through my nom object with his index like this:

<select class="form-control" v-model="nombre">
    <option v-for="nom in nombre">@{{ nom.cedula }}</option>
</select>

the second problem was my return at my vuejs file, i was returning one single output into a loop, this is the right way:

    var app = new Vue({
                el: '#root',
                data: {
                    cedula: '',
                    nombre: [],
                },
                watch: {
                    cedula: function() {
                        this.nombre = ''
                        if (this.cedula.length == 1) {
                            this.buscarCedula()
                            this.nombre = "Consultando cédula...";
                        }
                    }
                },
                methods: {
                    buscarCedula: _.debounce(function() {
                        axios.get('http://localhost/miapp/public/personas/mostrar')
                            .then(function(response) {

                                if (!response.data.error) {
                                    return app.nombre = response.data;

                                } else {
                                   return app.nombre = response.data.error;
                                }
                            })
                            .catch(function(error) {
                                app.nombre = error;
                            })
                    }, 500)
                }
)};
13 Jun
1 year ago

DanielLaravel started a new conversation Vuejs + Laravel Axios Array Problem

Hello, my problem is im trying to loop and array from Axios query into my blade template query is giving me no errrors but tells me is undefined multiple times on my select tag.

I have a simple Axios query from my Laravel Controller:

public function consultaPersonas()
    {
        $consulta = persona::all();
        if(!$consulta)
        {
            $consulta = ['error' => 'No hay registros'];
        }
        return $consulta;
    }

this query will bring me this little array:

[{"cedula":"15678453","nombre":"LUIS CHACON","edad":30},{"cedula":"2536524","nombre":"MARIO ORTEGA","edad":21},{"cedula":"25632541","nombre":"VANESSA ALCALA","edad":24}]

This is the Select Tag i want to loop:

<select class="form-control" v-model="nombre">
    <option v-for="nom in nombre">@{{ nombre }}</option>
</select>

Here's my Vuejs code:

var app = new Vue({
    el:'#root',
    data: {
        cedula:'',
        nombre:[],
    },

    watch: {
        cedula: function () {
            this.nombre = ''
            if(this.cedula.length == 1) {
                this.buscarCedula()
            this.nombre = "Consultando cédula...";
            }
        }
    },

    methods: {
        buscarCedula: _.debounce(function (){   
            axios.get('http://localhost/miapp/public/personas/mostrar')
                .then(function (response){

                    let datos = response.data;
                    let validar = datos.error;

                    if(!validar) {
                        app.nombre =
                        datos.cedula + ' - ' +
                        datos.nombre + ' - ' +
                        datos.edad;

                    }
                    else
                    {
                        app.nombre = validar;
                    }
                })
                .catch(function (error){
                    app.nombre = error;
                })
        }, 500)
    }
    

What am i doing wrong? Thanks.

10 May
2 years ago

DanielLaravel started a new conversation Vue Axios / Vue Resource + Laravel 5

Hello Laracast community, i need to use Vue Axios / Resource, i managed to make a HTML select box loaded from my database in my view, after i select any record i need to use another value from that record and put it into an HTML input, for example: in my html select i click on my "stpr_tx_descripcion" attribute, after that i need another atribute, the "stpr_in_ticket", but i don't know how make it dynamically.

This is what i got so far:

Im using Laravel to return a query object to my view like this:

´´´$query= spr_tipo_per_rep::all('stpr_tx_descripcion','stpr_in_ticket'); ->with('query',$query);´´´

In my view im using the Html select which loads the record:

´´´ Select value @foreach($query as $data) {{ $data->stpr_tx_descripcion }} @endforeach ´´´

Below that i need to put the value from "stpr_in_ticket" atribute which is another detail into my input using vue:

´´´´´´

Thanks.

06 Apr
2 years ago

DanielLaravel started a new conversation Laravel 5 Eloquent And Models Error

Hello Laracast community, im having this error with Eloquent models while trying to make multiple model joins:

BadMethodCallException in Builder.php line 2450: Call to undefined method Illuminate\Database\Query\Builder::adminis()

These are my models:


    namespace App\Modelos;

    use Illuminate\Database\Eloquent\Model;

    class srh_inf_persona extends Model
    {
        protected $table = 'srh_inf_personas';

        protected $primaryKey = ['infp_cedula'];

        public function adminis()
        {
            return $this->hasMany('App\Modelos\srh_infa_admini');
        }
    }```

```use Illuminate\Database\Eloquent\Model;

class srh_inf_admini extends Model
{
    protected $table = 'srh_inf_adminis';
    public $timestamps = 'false';

    protected $primaryKey = ['infa_cedula'];

    public function persona()
    {
        return $this->belongsTo('App\Modelos\srh_inf_persona');
    }
}```

and this is my controller:

```<?php

namespace App\Http\Controllers\Controladores;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Modelos\srh_inf_persona; // Llamado del modelo SRH_INF_PERSONA
use App\Modelos\srh_inf_admini; // Llamado del modelo SRH_INF_PERSONA

class SolicitudController extends Controller
{
    public function nuevasolicitud($ced)
    {       
        $consulta = srh_inf_persona::select('infp_cedula')->adminis()
        ->where('infp_cedula',$ced)
        ->first();

        return view('permisos.solicitud',[ 'personas' => $consulta ]);
    }

}```

Any idea what the problem is? Thanks alot.
05 Apr
2 years ago

DanielLaravel started a new conversation Laravel 5 And Dingo + JWT Problem

Hello Laracast community, i've working on a project using dymanic database for my user login, i just send the parameters configuration and works fine:

´´´ public function conectar($options) { // Set the database $database = $options['database']; $this->database = $database; // Figure out the driver and get the default configuration for the driver $driver = isset($options['driver']) ? $options['driver'] : Config::get("database.default"); $default = Config::get("database.connections.$driver"); // Loop through our default array and update options if we have non-defaults foreach($default as $item => $value) { $default[$item] = isset($options[$item]) ? $options[$item] : $default[$item]; } // Set the temporary configuration Config::set("database.connections.$database", $default); // Create the connection $this->connection = DB::connection($database); } ´´´ After i login and set a session like this: ´´´ $usuario = $request->session()->get('username'); $clave = $request->session()->get('password'); $otf = new \App\Conexiones\Conexion(); ´´´ I need to use JWT to make my API catch and comunicate between another Laravel projects and keep the user session, so far i've configuring Dingo API and Tymondesign JWT-Auth, but cannot generate the Token after i send username and password, when i do it by GET method i get "{"error":"invalid_credentials"}", this is my route and controller: ´´´ $api = app('Dingo\Api\Routing\Router'); // $api = app('api.router');

$api->version('v1', function($api) {

$api->get('autenticar','App\Http\Controllers\[email protected]');

}); ´´´ ´´´ public function autenticar(Request $request) { $credentials = ([$request->username,$request->password]); try { // attempt to verify the credentials and create a token for the user if (! $token = JWTAuth::attempt($credentials)) { return response()->json(['error' => 'invalid_credentials'], 401); } } catch (JWTException $e) { // something went wrong whilst attempting to encode the token return response()->json(['error' => 'could_not_create_token'], 500); }

    return response()->json(compact('token'));
}

´´´ I've testing the username and password and the values are getting to the controller but i can't manage to generate token so far. If i take off "all filters" and get to generate the Token i get this error " {"result":false,"token":"invalid_credentials"} ", and when i do it by POST method i get this error:

{"message":"405 Method Not Allowed","status_code":405,"debug":{"line":218,"file":"/home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php","class":"Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException","trace":["#0 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php(205): Illuminate\Routing\RouteCollection->methodNotAllowed(Array)","#1 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php(158): Illuminate\Routing\RouteCollection->getRouteForMethods(Object(Dingo\Api\Http\Request), Array)","#2 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Routing/Router.php(750): Illuminate\Routing\RouteCollection->match(Object(Dingo\Api\Http\Request))","#3 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Routing/Router.php(659): Illuminate\Routing\Router->findRoute(Object(Dingo\Api\Http\Request))","#4 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->dispatchToRoute(Object(Dingo\Api\Http\Request))","#5 /home/dchacon/public_html/trackye/vendor/dingo/api/src/Routing/Adapter/Laravel.php(81): Illuminate\Routing\Router->dispatch(Object(Dingo\Api\Http\Request))","#6 /home/dchacon/public_html/trackye/vendor/dingo/api/src/Routing/Router.php(513): Dingo\Api\Routing\Adapter\Laravel->dispatch(Object(Dingo\Api\Http\Request), 'v1')","#7 /home/dchacon/public_html/trackye/vendor/dingo/api/src/Http/Middleware/Request.php(126): Dingo\Api\Routing\Router->dispatch(Object(Dingo\Api\Http\Request))","#8 [internal function]: Dingo\Api\Http\Middleware\Request->Dingo\Api\Http\Middleware\{closure}(Object(Dingo\Api\Http\Request))","#9 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Dingo\Api\Http\Request))","#10 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Dingo\Api\Http\Request))","#11 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Dingo\Api\Http\Request), Object(Closure))","#12 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)","#13 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Dingo\Api\Http\Request))","#14 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Dingo\Api\Http\Request), Object(Closure))","#15 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)","#16 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Dingo\Api\Http\Request))","#17 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Dingo\Api\Http\Request), Object(Closure))","#18 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)","#19 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Dingo\Api\Http\Request))","#20 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Dingo\Api\Http\Request), Object(Closure))","#21 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)","#22 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Dingo\Api\Http\Request))","#23 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Dingo\Api\Http\Request), Object(Closure))","#24 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)","#25 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Dingo\Api\Http\Request))","#26 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Dingo\Api\Http\Request), Object(Closure))","#27 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)","#28 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Dingo\Api\Http\Request))","#29 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Dingo\Api\Http\Request))","#30 /home/dchacon/public_html/trackye/vendor/dingo/api/src/Http/Middleware/Request.php(127): Illuminate\Pipeline\Pipeline->then(Object(Closure))","#31 /home/dchacon/public_html/trackye/vendor/dingo/api/src/Http/Middleware/Request.php(103): Dingo\Api\Http\Middleware\Request->sendRequestThroughRouter(Object(Dingo\Api\Http\Request))","#32 [internal function]: Dingo\Api\Http\Middleware\Request->handle(Object(Illuminate\Http\Request), Object(Closure))","#33 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)","#34 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))","#35 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))","#36 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))","#37 /home/dchacon/public_html/trackye/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))","#38 /home/dchacon/public_html/trackye/public/index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))","#39 {main}"]}}

This if my .env file: ´´´ Options -MultiViews

RewriteEngine On

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

RewriteCond %{HTTP:Authorization} ^(.) 
RewriteRule . - [e=HTTP_AUTHORIZATION:%1]

´´´ this is my htaccess file: ´´´ Options -MultiViews

RewriteEngine On

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

RewriteCond %{HTTP:Authorization} ^(.) 
RewriteRule . - [e=HTTP_AUTHORIZATION:%1]

´´´ this is my api.php file: ´´´<?php

return [

/*
|--------------------------------------------------------------------------
| Standards Tree
|--------------------------------------------------------------------------
|
| Versioning an API with Dingo revolves around content negotiation and
| custom MIME types. A custom type will belong to one of three
| standards trees, the Vendor tree (vnd), the Personal tree
| (prs), and the Unregistered tree (x).
|
| By default the Unregistered tree (x) is used, however, should you wish
| to you can register your type with the IANA. For more details:
| https://tools.ietf.org/html/rfc6838
|
*/

'standardsTree' => env('API_STANDARDS_TREE', 'vnd'),

/*
|--------------------------------------------------------------------------
| API Subtype
|--------------------------------------------------------------------------
|
| Your subtype will follow the standards tree you use when used in the
| "Accept" header to negotiate the content type and version.
|
| For example: Accept: application/x.SUBTYPE.v1+json
|
*/

'subtype' => env('API_SUBTYPE', 'trackye'),

/*
|--------------------------------------------------------------------------
| Default API Version
|--------------------------------------------------------------------------
|
| This is the default version when strict mode is disabled and your API
| is accessed via a web browser. It's also used as the default version
| when generating your APIs documentation.
|
*/

'version' => env('API_VERSION', 'v1'),

/*
|--------------------------------------------------------------------------
| Default API Prefix
|--------------------------------------------------------------------------
|
| A default prefix to use for your API routes so you don't have to
| specify it for each group.
|
|valor previo: 'prefix' => env('API_PREFIX', null),
*/

'prefix' => env('API_PREFIX', 'api'),

/*
|--------------------------------------------------------------------------
| Default API Domain
|--------------------------------------------------------------------------
|
| A default domain to use for your API routes so you don't have to
| specify it for each group.
|
*/

'domain' => env('API_DOMAIN', null),

/*
|--------------------------------------------------------------------------
| Name
|--------------------------------------------------------------------------
|
| When documenting your API using the API Blueprint syntax you can
| configure a default name to avoid having to manually specify
| one when using the command.
|
*/

'name' => env('API_NAME', 'trackye api'),

/*
|--------------------------------------------------------------------------
| Conditional Requests
|--------------------------------------------------------------------------
|
| Globally enable conditional requests so that an ETag header is added to
| any successful response. Subsequent requests will perform a check and
| will return a 304 Not Modified. This can also be enabled or disabled
| on certain groups or routes.
|
*/

'conditionalRequest' => env('API_CONDITIONAL_REQUEST', true),

/*
|--------------------------------------------------------------------------
| Strict Mode
|--------------------------------------------------------------------------
|
| Enabling strict mode will require clients to send a valid Accept header
| with every request. This also voids the default API version, meaning
| your API will not be browsable via a web browser.
|
*/

'strict' => env('API_STRICT', false),

/*
|--------------------------------------------------------------------------
| Debug Mode
|--------------------------------------------------------------------------
|
| Enabling debug mode will result in error responses caused by thrown
| exceptions to have a "debug" key that will be populated with
| more detailed information on the exception.
|
*/

'debug' => env('API_DEBUG', true),

/*
|--------------------------------------------------------------------------
| Generic Error Format
|--------------------------------------------------------------------------
|
| When some HTTP exceptions are not caught and dealt with the API will
| generate a generic error response in the format provided. Any
| keys that aren't replaced with corresponding values will be
| removed from the final response.
|
*/

'errorFormat' => [
    'message' => ':message',
    'errors' => ':errors',
    'code' => ':code',
    'status_code' => ':status_code',
    'debug' => ':debug',
],

/*
|--------------------------------------------------------------------------
| API Middleware
|--------------------------------------------------------------------------
|
| Middleware that will be applied globally to all API requests.
|
*/

'middleware' => [

],

/*
|--------------------------------------------------------------------------
| Authentication Providers
|--------------------------------------------------------------------------
|
| The authentication providers that should be used when attempting to
| authenticate an incoming API request.
|
*/

'auth' => [ 
    'jwt' => 'Dingo\Api\Auth\Provider\JWT'
],

/*
|--------------------------------------------------------------------------
| Throttling / Rate Limiting
|--------------------------------------------------------------------------
|
| Consumers of your API can be limited to the amount of requests they can
| make. You can create your own throttles or simply change the default
| throttles.
|
*/

'throttling' => [

],

/*
|--------------------------------------------------------------------------
| Response Transformer
|--------------------------------------------------------------------------
|
| Responses can be transformed so that they are easier to format. By
| default a Fractal transformer will be used to transform any
| responses prior to formatting. You can easily replace
| this with your own transformer.
|
*/

'transformer' => env('API_TRANSFORMER', Dingo\Api\Transformer\Adapter\Fractal::class),

/*
|--------------------------------------------------------------------------
| Response Formats
|--------------------------------------------------------------------------
|
| Responses can be returned in multiple formats by registering different
| response formatters. You can also customize an existing response
| formatter.
|
*/

'defaultFormat' => env('API_DEFAULT_FORMAT', 'json'),

'formats' => [

    'json' => Dingo\Api\Http\Response\Format\Json::class,

],

]; ´´´ and my .env ´´´API_NAME=trackye api API_DEBUG=true API_PREFIX=api API_DEFAULT_FORMAT = json API_TRANSFORMER = Dingo\Api\Transformer\Adapter\Fractal ´´´

04 Apr
2 years ago

DanielLaravel started a new conversation Laravel 5 API

Hello Laravel community, i'm working on a API for Laravel 5.3 right now. The API already my own login interface and after users login they will see some URL's that will take them to another Laravel projects by separate and these projects will validate or receive the login authentication, the challenge is that the API must generates some sort of Token, like JWT, which helps me to redirect to these Laravel projects and make the user login persist throught all systems.

So far i've managed to make a Dynamic database user login which validates user and it's privileges not the ´´´.env´´´ DB_USERNAME and DB_PASSWORD acording to the project needs, and i've trying to make Dingo + JWT Packages to work but had no success so far, because it's hard to configure and only returns me routing errors and null tokens.

I need some ideas to keep going.

Thank you very much.

31 Mar
2 years ago

DanielLaravel left a reply on Laravel 5.3 Wish List

Hello, i would like to easily set dynamic connections, for example the username and password introduced by the client, and not the one in the .env file, to avoid setting connection like this:

Config::set("database.connections.yourCustomConfig", [
    "host" => "1.2.3.4",
    "database" => "differentDBName",
    "username" => "user",
    "password" => "password"
]);

and avoid instancing this in all Models.

29 Mar
2 years ago

DanielLaravel started a new conversation Database Connections

I'm using Laravel 5. I see Laravel uses .env to connect databases for example DB_USERNAME and DB_PASSWORD, but i want to log in and use my username and password from my form to connect with those values from withim my oracle database with a table name "dba_users" which has the user and password and some others fields

i want to do that becauses each user has their own granted permissions(roles) to some tables, thus Oracle would manage the user login permissions and not the .env DB_USERNAME.

Thank you Laravel community.