Cyber Monday! Get 25% off for as long as you keep your subscription. New subscribers only.

alinad

alinad

Member Since 1 Month Ago

Experience Points
290
Total
Experience

4,710 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 Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

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

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

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

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

Level 1
290 XP
Nov
28
2 days ago
Activity icon

Started a new Conversation Laravel Schedule, How To Call Function

how i can to call the funtion in this handle function

public function handle() {

}

or from kernel file

protected function schedule(Schedule $schedule) {

}

Activity icon

Replied to How Call Controller From A Command Line ?

how i can to call the funtion in this handle function

public function handle() {

}

or from kernel file

protected function schedule(Schedule $schedule) {

}

Activity icon

Replied to Scheduling Commands

how i can to call the funtion in this handle function

public function handle() {

}

or from kernel file

protected function schedule(Schedule $schedule) {

}

Nov
13
2 weeks ago
Activity icon

Started a new Conversation I Am Usin Jquery Datatable And I Want To Use Createdrow In Datatable But Its Now Work

i am using jquery datatable in laravel project with using ajax and I want to make red those time fields that are for example > = '10: 10 ' if who can help me I'll be very grateful to you here my source code

  $(document).ready(function() {
  function load_data(from_date = '', to_date = '') {
       $('#order_table').DataTable({
         processing: true,
        serverSide: true,
        responsive: true,
        ajax: {
            url: '{{ route("daterange.index") }}',
            data: {
                from_date: from_date,
                to_date: to_date
            }
        },
        dom: "<'row'<'col-sm-12 col-md-4'l><'col-sm-12 col-md-4'B><'col-sm-12 col-md-4'f>>" +
            "<'row'<'col-sm-12'tr>>" +
            "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
        "buttons": [
            'excel', 'copy', 'print'
        ],
        responsive: true,
        "columns": [
{ "data": "name" },
{ "data": "operdate" },
{ "data": "dateout" },
{ "data": "datein" },
{ "data": "fdateout" },
{ "data": "fdatein" },
        ],


 "createdRow":function(row,data,Index){
  //  if ( data[5].replace(/[$,:]/g, '')  > 0810 ) {
      if(data[5] >= '10:10'){

        $('td', row).eq(5).addClass('highlight');
       // $(row).addClass( 'colored-row' );
        // $('td',row).css({
        //            'background-color':'#FF0000',
        //            'color':'white',
        //            'border-style':'solid',
        //            'border-color':'#bdbdbd'
        //        });
           }
       },

    });
  

 }
load_data();
 });

     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">

   <link rel="stylesheet" href="https://cdn.datatables.net/1.10.22/css/jquery.dataTables.min.css">

   <script src=" https://code.jquery.com/jquery-3.5.1.js"></script>

   <script type="text/javascript" src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
Oct
31
4 weeks ago
Activity icon

Replied to Can You Help Me With Ldaprecord ? I'm Trying To Implements An LDAP Authentication In An Application For My Company. I'm Using Laravel 5.8 And The LdapRecord Package

thank you very much , now when i tested it shows me Successfully connected

but when i wont to auth with my app it pops up an error

These credentials do not match our records ?

Activity icon

Replied to Can You Help Me With Ldaprecord ? I'm Trying To Implements An LDAP Authentication In An Application For My Company. I'm Using Laravel 5.8 And The LdapRecord Package

	LDAP_LOGGING=true
	LDAP_CONNECTION=default
	LDAP_HOST=ldap.forumsys.com
	LDAP_USERNAME="cn=test test, ou=people dc=moliya,dc=local"
	LDAP_PASSWORD=password 
	LDAP_PORT=389
	LDAP_BASE_DN="dc=example,dc=com"
	LDAP_TIMEOUT=5
	LDAP_SSL=false
	LDAP_TLS=false
Activity icon

Replied to LDAP Auth Laravel 5.6

can you send me your work souce code at my email [email protected]

Activity icon

Replied to LDAP Authentication With Laravel 5

@Kristina how you diside you problem with ldap laravel ?

Activity icon

Started a new Conversation Can You Help Me With Ldaprecord ? I'm Trying To Implements An LDAP Authentication In An Application For My Company. I'm Using Laravel 5.8 And The LdapRecord Package

I have succeed to connect the application with the LDAP server test see Successfully connected and my to authenticate with openldap to online server its also Successfully. but when i want to do the authentication with active directory to my app it not working , Why who can help me? Here is my code :

The .env


	LDAP_LOGGING=true
	LDAP_CONNECTION=default
	LDAP_HOST=server
	LDAP_PORT=389
	LDAP_BASE_DN="dc=mydomain,dc=local"
	LDAP_TIMEOUT=5
	LDAP_SSL=false
	LDAP_TLS=false

The ldap.php

return [

	 'default' => env('LDAP_CONNECTION', 'default'),


		'connections' => [

    		'default' => [
        	'hosts' => [env('LDAP_HOST', 'server')],
        	'username' => env('LDAP_USERNAME', ''),
        	'password' => env('LDAP_PASSWORD', ''),
        	'port' => env('LDAP_PORT', 389),
        	'base_dn' => env('LDAP_BASE_DN', 'dc=mydomain,dc=local'),
        	'timeout' => env('LDAP_TIMEOUT', 5),
        	'use_ssl' => env('LDAP_SSL', false),
        	'use_tls' => env('LDAP_TLS', false),
    		],	

		],

		'logging' => env('LDAP_LOGGING', true),



			'cache' => [
    			'enabled' => env('LDAP_CACHE', false),
    			'driver' => env('CACHE_DRIVER', 'file'),
],
];

The auth.php.

return [

'defaults' => [
    'guard' => 'web',
    'passwords' => 'users',
],

'guards' => [
    'web' => [
        'driver' => 'session',
        'provider' => 'ldap',
    ],

    'api' => [
        'driver' => 'token',
        'provider' => 'users',
        'hash' => false,
    ],
],



'providers' => [
    'users' => [
        'driver' => 'eloquent' ,
        'model' => App \ User :: class,
    ],
    'ldap' => [
        'driver' => 'ldap',
      'model' => LdapRecord\Models\ActiveDirectory\User::class,
     //   'model' => LdapRecord\Models\OpenLDAP\User::class,
        'database' => [
            'model' => App\User::class,
            'sync_passwords' => false,
            'sync_attributes' => [
                'name' => 'cn',
                'email' => 'mail',
            ],
        ],
    ]

    // 'users' => [
    //     'driver' => 'database',
    //     'table' => 'users',
    // ],
],



'passwords' => [
    'users' => [
        'provider' => 'users',
        'table' => 'password_resets',
        'expire' => 60,
        'throttle' => 60,
    ],
],



'password_timeout' => 10800,
];

The user.php model

namespace App; use
 Illuminate\Contracts\Auth\MustVerifyEmail; 
use Illuminate\Foundation\Auth\User as Authenticatable; 
use Illuminate\Notifications\Notifiable; 
use LdapRecord\Laravel\Auth\LdapAuthenticatable; 
use LdapRecord\Laravel\Auth\AuthenticatesWithLdap;

class User extends Authenticatable implements LdapAuthenticatable 
{ use Notifiable, AuthenticatesWithLdap, HasLdapUser ;

protected $fillable = [
    'name',
    'email',
    'password',

];

protected $hidden = [
        'password', 'remember_token' ,
    ];

    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'email_verified_at' => 'datetime',
    ];
}

The LoginController

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
    class LoginController extends Controller
	{



	use AuthenticatesUsers;

	protected $redirectTo = RouteServiceProvider::HOME;


public function __construct()
{
    $this->middleware('guest')->except('logout');
}

protected function credentials(Request $request)
{
    return [
        'uid' => $request->get('username'),
        'password' => $request->get('password'),
    ];
}

public function username()
{
    return 'username';
}
 
 

Activity icon

Replied to Adldap2-Laravel With Windows Active Directory

Hi raelo , are you completed your auth with ldap ?

Activity icon

Replied to Adldap2-Laravel With Windows Active Directory

HI SunnyBoy, you create a repository your work code ? if no can you sent me your wokr source code to [email protected]

Oct
30
1 month ago
Activity icon

Replied to Adldap2-Laravel With Windows Active Directory

can you help me with ldaprecord ? I'm trying to implements an LDAP authentication in an application for my company. I'm using Laravel 5.8 and the LdapRecord package

I have succeed to connect the application with the LDAP server test see Successfully connected and my to authenticate with openldap to online server its also Successfully. but when i want to do the authentication with active directory to my app it not working , Why who can help me? Here is my code :

The .env

LDAP_LOGGING=true
LDAP_CONNECTION=default
LDAP_HOST=server
LDAP_PORT=389
LDAP_BASE_DN="dc=mydomain,dc=local"
LDAP_TIMEOUT=5
LDAP_SSL=false
LDAP_TLS=false

The ldap.php

return [

 'default' => env('LDAP_CONNECTION', 'default'),



'connections' => [

    'default' => [
        'hosts' => [env('LDAP_HOST', 'server')],
        'username' => env('LDAP_USERNAME', ''),
        'password' => env('LDAP_PASSWORD', ''),
        'port' => env('LDAP_PORT', 389),
        'base_dn' => env('LDAP_BASE_DN', 'dc=mydomain,dc=local'),
        'timeout' => env('LDAP_TIMEOUT', 5),
        'use_ssl' => env('LDAP_SSL', false),
        'use_tls' => env('LDAP_TLS', false),
    ],

],



'logging' => env('LDAP_LOGGING', true),



'cache' => [
    'enabled' => env('LDAP_CACHE', false),
    'driver' => env('CACHE_DRIVER', 'file'),
],

];

The auth.php.

return [

'defaults' => [
    'guard' => 'web',
    'passwords' => 'users',
],

'guards' => [
    'web' => [
        'driver' => 'session',
        'provider' => 'ldap',
    ],

    'api' => [
        'driver' => 'token',
        'provider' => 'users',
        'hash' => false,
    ],
],



'providers' => [
    'users' => [
        'driver' => 'eloquent' ,
        'model' => App \ User :: class,
    ],
    'ldap' => [
        'driver' => 'ldap',
      'model' => LdapRecord\Models\ActiveDirectory\User::class,
     //   'model' => LdapRecord\Models\OpenLDAP\User::class,
        'database' => [
            'model' => App\User::class,
            'sync_passwords' => false,
            'sync_attributes' => [
                'name' => 'cn',
                'email' => 'mail',
            ],
        ],
    ]

    // 'users' => [
    //     'driver' => 'database',
    //     'table' => 'users',
    // ],
],



'passwords' => [
    'users' => [
        'provider' => 'users',
        'table' => 'password_resets',
        'expire' => 60,
        'throttle' => 60,
    ],
],



'password_timeout' => 10800,

];

The user.php model

namespace App; use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; use LdapRecord\Laravel\Auth\LdapAuthenticatable; use LdapRecord\Laravel\Auth\AuthenticatesWithLdap;

class User extends Authenticatable implements LdapAuthenticatable { use Notifiable, AuthenticatesWithLdap, HasLdapUser ;

protected $fillable = [
    'name',
    'email',
    'password',

];

protected $hidden = [
    'password', 'remember_token' ,
];


protected $casts = [
    'email_verified_at' => 'datetime',
];

}

The LoginController

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
    class LoginController extends Controller
	{



	use AuthenticatesUsers;

	protected $redirectTo = RouteServiceProvider::HOME;


public function __construct()
{
    $this->middleware('guest')->except('logout');
}

protected function credentials(Request $request)
{
    return [
        'uid' => $request->get('username'),
        'password' => $request->get('password'),
    ];
}

public function username()
{
    return 'username';
}

Is there anyone who has already used this package and can help me on my code ? thank you in advance :)

Activity icon

Replied to Adldap2-Laravel With Windows Active Directory

can you help me with ldaprecord ?