wiznox

wiznox

Member Since 2 Months Ago

Experience Points
300
Total
Experience

4,700 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
300 XP
Feb
18
1 month ago
Activity icon

Replied to Stripe Payment Gateway Using Laravel Cashier Single Time Payment

This is not my answer please try again :)

Activity icon

Replied to How To Write Code In Laracast?

This is working nice @snapey

Activity icon

Started a new Conversation Stripe Payment Gateway Using Laravel Cashier Single Time Payment

How to solve this problem ‚Äč



 $user = Auth::user();
        try {
            $subscription = $user->charge(100, $request->payment_method);
        } catch (Exception $e) {
            dd($e);
        }
        dd($subscription);

As per Indian regulations, export transactions require a description. More info here: https://stripe.com/docs/india-exports

Feb
12
1 month ago
Activity icon

Replied to Do You Use Database Transactions For Your Eloquent Queries?

Try this one

DB::beginTransaction(); try { $project = Project::find($id); $project->users()->detach(); $project->delete(); DB::commit(); } catch (\Exception $ex) { DB::rollback(); return response()->json(['error' => $ex->getMessage()], 500); }

Jan
30
2 months ago
Jan
10
2 months ago
Activity icon

Replied to After Login And Create Session Redirect To Login

And thanks for your response but my problem is solved.

Activity icon

Replied to After Login And Create Session Redirect To Login

Simply try i don't understand But

if ( Auth::attempt($credentials) ) { // Login Success // Redirect }

Login is success but after redirect middleware auth is redirect to login

Jan
09
2 months ago
Activity icon

Replied to Laravel 5.4 Auth Session Timeout

Thanks my problem is different but solve your commands. Thanks alot

Activity icon

Started a new Conversation After Login And Create Session Redirect To Login

Hi all My laravel app which is i am using apis for jwt token and for web routes for using session but my web login not working first my login code is correct and generate session but auth is redirect to login page please solve my problem

This is my route list

+--------+----------+---------------------+----------------+------------------------------------------------------+----------------+
| Domain | Method   | URI                 | Name           | Action                                               | Middleware     |
+--------+----------+---------------------+----------------+------------------------------------------------------+----------------+
|        | GET|HEAD | admin               | adminlogin     | App\Http\Controllers\Admin\[email protected]     | web            |
|        | GET|HEAD | admin/addUser       |                | App\Http\Controllers\Admin\[email protected]   | web,auth       |
|        | DELETE   | admin/delete        |                | App\Http\Controllers\Admin\[email protected]    | web,auth       |
|        | POST     | admin/doAddUser     |                | App\Http\Controllers\Admin\[email protected] | web,auth       |
|        | GET|HEAD | admin/edit/{id}     |                | App\Http\Controllers\Admin\[email protected]      | web,auth       |
|        | GET|HEAD | admin/home          | admindashboard | App\Http\Controllers\Admin\[email protected]     | web,auth       |
|        | POST     | admin/login         | postLogin      | App\Http\Controllers\Admin\[email protected]   | web            |
|        | POST     | admin/logout        |                | App\Http\Controllers\Admin\[email protected]    | web,auth       |
|        | POST     | admin/profile       |                | App\Http\Controllers\Admin\[email protected]   | web,auth       |
|        | POST     | admin/updateUser    |                | App\Http\Controllers\Admin\[email protected]    | web,auth       |
|        | GET|HEAD | admin/user          |                | App\Http\Controllers\Admin\[email protected]     | web,auth       |
|        | GET|HEAD | api/user            |                | Closure                                              | api,auth:api   |
|        | GET|HEAD | api/v1/user         |                | App\Http\Controllers\[email protected]            | api,jwt.verify |
|        | POST     | api/v1/user         |                | App\Http\Controllers\[email protected]          | api            |
|        | PUT      | api/v1/user         |                | App\Http\Controllers\[email protected]          | api,jwt.verify |
|        | POST     | api/v1/user/login   |                | App\Http\Controllers\[email protected]           | api            |
|        | POST     | api/v1/user/logout  |                | App\Http\Controllers\[email protected]          | api,jwt.verify |
|        | GET|HEAD | api/v1/user/me      |                | App\Http\Controllers\[email protected]              | api,jwt.verify |
|        | GET|HEAD | api/v1/user/refresh |                | App\Http\Controllers\[email protected]         | api,jwt.verify |
|        | DELETE   | api/v1/user/{id}    |                | App\Http\Controllers\[email protected]          | api,jwt.verify |
+--------+----------+---------------------+----------------+------------------------------------------------------+----------------+

This is My login code

    if (isset($request->validator) && $request->validator->fails()) {
    return redirect('/admin')
    ->withErrors($request->validator) // send back all errors to the login form
    ->withInput(Input::except('password')); // send back the input (not the password) so that we can repopulate the form
    }else {
        $userdata = array(
            'email'     => $request->input('email'),
            'password'  => $request->input('password')
        );  
if (Auth::attempt($userdata)) {
    dd(Auth::attempt($userdata));
    return redirect()->intended('admin/home');
} else {        
    return redirect('/admin');
}  

}

Activity icon

Replied to Route [admin] Not Defined.

I am using jwt token for apis but when i am creating auth routes in web by using auth middleware with custom login functionality middleware can't authenticate our auth routes but i have successfully login with attempt function my issue is this.

Activity icon

Replied to Route [admin] Not Defined.

+--------+----------+---------------------+----------------+------------------------------------------------------+----------------+
| Domain | Method   | URI                 | Name           | Action                                               | Middleware     |
+--------+----------+---------------------+----------------+------------------------------------------------------+----------------+
|        | GET|HEAD | admin               | adminlogin     | App\Http\Controllers\Admin\[email protected]     | web            |
|        | GET|HEAD | admin/addUser       |                | App\Http\Controllers\Admin\[email protected]   | web,auth       |
|        | DELETE   | admin/delete        |                | App\Http\Controllers\Admin\[email protected]    | web,auth       |
|        | POST     | admin/doAddUser     |                | App\Http\Controllers\Admin\[email protected] | web,auth       |
|        | GET|HEAD | admin/edit/{id}     |                | App\Http\Controllers\Admin\[email protected]      | web,auth       |
|        | GET|HEAD | admin/home          | admindashboard | App\Http\Controllers\Admin\[email protected]     | web,auth       |
|        | POST     | admin/login         | postLogin      | App\Http\Controllers\Admin\[email protected]   | web            |
|        | POST     | admin/logout        |                | App\Http\Controllers\Admin\[email protected]    | web,auth       |
|        | POST     | admin/profile       |                | App\Http\Controllers\Admin\[email protected]   | web,auth       |
|        | POST     | admin/updateUser    |                | App\Http\Controllers\Admin\[email protected]    | web,auth       |
|        | GET|HEAD | admin/user          |                | App\Http\Controllers\Admin\[email protected]     | web,auth       |
|        | GET|HEAD | api/user            |                | Closure                                              | api,auth:api   |
|        | GET|HEAD | api/v1/user         |                | App\Http\Controllers\[email protected]            | api,jwt.verify |
|        | POST     | api/v1/user         |                | App\Http\Controllers\[email protected]          | api            |
|        | PUT      | api/v1/user         |                | App\Http\Controllers\[email protected]          | api,jwt.verify |
|        | POST     | api/v1/user/login   |                | App\Http\Controllers\[email protected]           | api            |
|        | POST     | api/v1/user/logout  |                | App\Http\Controllers\[email protected]          | api,jwt.verify |
|        | GET|HEAD | api/v1/user/me      |                | App\Http\Controllers\[email protected]              | api,jwt.verify |
|        | GET|HEAD | api/v1/user/refresh |                | App\Http\Controllers\[email protected]         | api,jwt.verify |
|        | DELETE   | api/v1/user/{id}    |                | App\Http\Controllers\[email protected]          | api,jwt.verify |
+--------+----------+---------------------+----------------+------------------------------------------------------+----------------+
Activity icon

Started a new Conversation Route [admin] Not Defined.

Route::group(["namespace"=>"Admin",'middleware' => 'auth','prefix' => 'admin'], function () { Route::get('/home', [ 'as' => 'admindashboard', 'uses' => '[email protected]']); Route::get('/user', '[email protected]'); Route::post('/logout','[email protected]'); Route::post('/profile','[email protected]'); Route::delete('/delete','[email protected]'); Route::get('/edit/{id}','[email protected]'); Route::post('/updateUser','[email protected]'); Route::get('/addUser','[email protected]'); Route::post('/doAddUser','[email protected]'); });

Route::group(["namespace"=>"Admin"],function () { Route::post('/admin/login',[ 'as' => 'postLogin', 'uses' => '[email protected]']); Route::get('/admin', [ 'as' => 'adminlogin', 'uses' => '[email protected]']); });

Jan
03
2 months ago
Activity icon

Started a new Conversation Creating Default Object From Empty Value

p