EddiePuig

EddiePuig

Member Since 6 Months Ago

Experience Points 490
Experience Level 1

4,510 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.

22 Nov
4 months ago

EddiePuig left a reply on How To Automatically Download A File Of Storage???

@AMK - I have tried this, but im getting 419 error, unknown status

EddiePuig left a reply on How To Automatically Download A File Of Storage???

@MICHAELNGUYEN547 - Yes, im begginer. Im trying to send some info to put in a file and download the file, with only one click of a button. Do you have any better way?

EddiePuig left a reply on How To Automatically Download A File Of Storage???

@realrandyallen look, inside my function i have:

Storage::put('a.cfg', $some->text);

    return Storage::download('a.cfg'); 

Then in the browser inspector, when i go to the Network tab i get the response, i double-click it and then download the file. I dont know what to do!!!

EddiePuig started a new conversation How To Automatically Download A File Of Storage???

I have a file in my storage folder, how can i download that file automatically?? With just a click!!??

17 Oct
5 months ago

EddiePuig left a reply on Storage::download() Not Working Properly

Im not getting the download! In the ajax i have succes:function(data){ console.log(data); } and in the console i receive the text inside the file but no the file as a download

EddiePuig started a new conversation Storage::download() Not Working Properly

My code:

public function sendCfg(Request $request){

    Storage::put('a.cfg', $request->text);

    return Storage::download('a.cfg','config.cfg');

}

EddiePuig left a reply on How To Create A File Inside My Server Or My Project And Write Text Inside It? Also I Need Download It!

@Borisu look that i wrote:

public function sendCfg(Request $request){

    Storage::put('a.cfg', $request->text);

    return Storage::download('a.cfg');

}

It creates the file in ...storage/app but dont write $request->text inside the file and dont download it

EddiePuig started a new conversation How To Create A File Inside My Server Or My Project And Write Text Inside It? Also I Need Download It!

I have a form with a textarea and i need to write the text inside it in a new file that i wish to create. After that, i need to download the file. Anyone can help me please?!

15 Oct
5 months ago

EddiePuig left a reply on Redirect() After Auth::loginUsingId() Isn't Working!!!

@Ishatanjeeb occurs the same when i put your code. Not redirecting

EddiePuig left a reply on Redirect() After Auth::loginUsingId() Isn't Working!!!

NO @lostdreamer_nl in my database i have only a column user i dont need anything else. redirect() is the problem i think

EddiePuig left a reply on Redirect() After Auth::loginUsingId() Isn't Working!!!

Also Auth::user() returns null!

EddiePuig started a new conversation Redirect() After Auth::loginUsingId() Isn't Working!!!

my web .php:

Route::group(['middleware' => ['web']], function () { Route::get('/login','[email protected]')->name('login'); Route::post('/login','[email protected]'); Route::get('/dashboard','[email protected]')->name('dash'); });

my [email protected]():

if($user = User::where('user', $request->user)->exists()){ dd($user); Auth::loginUsingId($user->id,true); return redirect()->route('dash');

        } else {
            $user = User::create([
                'user' => $request->user,
            ]);

            dd($user);
            Auth::loginUsingId($user->id);
            return redirect()->route('dash');

        }

What's the problem here!?

05 Oct
5 months ago

EddiePuig started a new conversation Auth::attempt($userToAttempt) Gives An Error.

//this is in my doLogin method

$userToAttemp = array([ 'user' => $request->user ]);

        if($user = User::where('user', $request->user)->get()){

            Auth::attempt($userToAttemp);
            $thisUser = Auth::user()->user;
            return view('dashboard',compact($thisUser));
        } 

and so on .......

What Im doing wrong?????

03 Oct
5 months ago

EddiePuig started a new conversation I Need Change The Auth Default Logic Of Laravel, How Can I Do It???

I need include a function for loging in a LDAP and many other things. I just wanna know where is the [email protected] method and change its internal code.

01 Oct
5 months ago
13 Sep
6 months ago

EddiePuig left a reply on Undefined Variable: Configs (View: C:\xampp\htdocs\KickSeed\resources\views\admin_panel.blade.php)

How I can update the data that I pass to the view ("$configs") after post to make @foreach function again???

Sorry for my english if I make a mistake. i speak Spanish but i do my best.

12 Sep
6 months ago

EddiePuig left a reply on Undefined Variable: Configs (View: C:\xampp\htdocs\KickSeed\resources\views\admin_panel.blade.php)

What I want to do is send the data and display all the old data in table and the last data that I send @Snapey

EddiePuig left a reply on Undefined Variable: Configs (View: C:\xampp\htdocs\KickSeed\resources\views\admin_panel.blade.php)

When I press submit button, this page send the info to database but gives me that error

10 Sep
6 months ago

EddiePuig started a new conversation Undefined Variable: Configs (View: C:\xampp\htdocs\KickSeed\resources\views\admin_panel.blade.php)

I have this in my AdminController: public function index() { $configs = Kickstart::all(); return view('admin_panel',compact('configs')); }

This is my view admin_panel.blade.php

Configuración
        </div>
        <div class="form-group submitButton text-center">
            <button class="btn btn-primary btn-submit" type="submit">Añadir</button>
        </div>
    </form>
</div>
<div class="row">
    <ul class="list-group">
    @foreach($configs as $config)
            <li class="list-group-item list-group-item-info">{{$config->config}}</li>
    @endforeach
    </ul>

</div>

... and my script

$.ajaxSetup({

    headers: {

        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')

    }

});


$(".btn-submit").click(function(e){
    e.preventDefault();


    var config = $("input[name=config]").val();



    $.ajax({

        type:'POST',

        url:'/admin',

        data: {config:config},

        error:function(data){
            swal("Error!","Not working yet", "error");
            console.log(data);
        },
        success:function(data) {
            swal("Success!", "Nueva Configuracion añadida", "success");
            console.log(data);
        }



    });


});

Curiously this code displays what i want but gives me an error

Undefined variable: configs (View: C:\xampp\htdocs\KickSeed\resources\views\admin_panel.blade.php)