Baptiste

Baptiste

Member Since 2 Years Ago

Experience Points 1,180
Experience Level 1

3,820 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.

08 Apr
2 years ago

Baptiste started a new conversation How To Retrieve A Value In A Route From A Controller

Hello to you,

I have a view or I list my games and I have a button that allows me To access the forum according to the games :

Forum

I need to recover the value at the end of my url so 1 in this context in order to be able to reference the forum according to the game but since my controller how can I do?

Http:// localhost/multigaming/public/subject?1

Here is the subject index:

    public function index() {  
   
    $lesSujets = Sujet::paginate(20);    
    return view('sujet/index', compact('lesSujets'));
     
    } 

 

31 Mar
2 years ago
25 Mar
2 years ago

Baptiste started a new conversation Package Chatter

Hello to you,

I have to create a forum for a site I game and I would install the package chatter. Just before ca, I would like to have opinions, who advice me ?

Thank you in advance for your advice.

06 Mar
2 years ago

Baptiste started a new conversation How To Communicate A Database In MySQL With A Database In Windev

Hello to you,

I create a site in Laravel 5.3 with for database management system MySQL 5.7.11 and I have to retrieve attributes from the database of the computer park. But this database is under Windev.

How can I make to interact these two basic?

24 Feb
2 years ago

Baptiste left a reply on How To Include Animate Css In Sweetalert2

Hello,

I just want to be able to modify my overlay method ? No one has a solution ?

23 Feb
2 years ago

Baptiste started a new conversation How To Include Animate Css In Sweetalert2

Hello,

I can display my alerts but I would like to be able to configure them. I managed to trigger an alert when I clicked a button but in my case what I would like is to use animate css with an overlay () alert. It shows up well what I would like is just to make it move according to the options.

Here is what I do :

HomeController :

public function index(){

if ($sommePoidsC >= 400){ Alert()->overlay('Warning !', 'The amount is exceeded'! ','warning'); }

}

flash.php :

class Flash {

public function create($title, $message, $type, $key = 'flash_message')
{
    return session()->flash($key, [
        'title'     => $title,
        'message'   => $message,
        'type'      => $type
    ]);
}

public function overlay($title, $message, $type = 'warning') { return $this->create($title, $message, $type, 'flash_message_overlay'); }

flash.blade.php (which is imported) :

@if (session()->has('flash_message_overlay'))

swal({ title: "session('flash_message_overlay.title')", text: "session('flash_message_overlay.message')", type: "session('flash_message_overlay.type')", confirmButtonText: 'Ok', animation: 'false', customClass: 'animated tada' });

@endif

And in my view home I do @include ('flash').

Ah yes I forgot to specify that I used laravel 5.3 and that for alerts I use the packet infinety / alerts.

15 Feb
2 years ago

Baptiste started a new conversation Button Confirmation SweetAlert2 Delete

Hello, my confirmation button does not work. I can show the confirmation and it appears correctly by doing no action but when I click "Yes delete" nothing happens. I do not know much about ajax and jquery so i will need help please thanks in advance.

Routes : web.php

Route::delete('peri/truncate','[email protected]')->name('peri.truncatePeri');

index.blade.php

{ {{ Form::open(['route' => ['peri.truncatePeri'], 'method' => 'delete', 'class'=>'delete_form']) }}

RAZ table déchets {{ Form::close() }}

}

JS

$('#periTruncate').on('click', function(e){ e.preventDefault();

    swal({
        title             : "Are you sure?",
        text              : "You will not be able to recover this Album!",
        type              : "warning",
        showCancelButton  : true,
        confirmButtonColor: "#DD6B55",
        confirmButtonText : "Yes, delete it!",
        cancelButtonText  : "No, Cancel delete!",
        closeOnConfirm    : false,
        closeOnCancel     : false
    },
     function(isConfirm){
      if (isConfirm) {
      $.ajax({
       method: 'delete',
       url: that.attr('action'),
      })
     .done(function() {
   
     .fail(function() {

    }); 
    
   }  
});  

});

Controller

{ public function truncatePeri(Request $request) {

    $site_id = auth()->user()->site_id; 
    $peri = DB::table('peris')->where('site_id', $site_id)->delete();  
    alert()->success('Bien joué !', 'La remise à zéro a été effectuée avec succès');
    return redirect(route('peri.indexPeri'));
    
}

}

Normally I just want to redirect to my truncatePeri function when I click ok and I have to return it no value according to me seen that all this do at controller level no ?

13 Feb
2 years ago

Baptiste left a reply on Sweetalert2 Getting It To Work

Hello to you,

I allow myself to give a comment on this discussion because I find it very interesting and I am trying to make a confirmation of deletion but I do not see how to do.

Could you help me please ?

12 Feb
2 years ago

Baptiste left a reply on Confirmation White SweetAlert

I resumed the line with the button I indicated in the link but it does not appear otherwise it should be between the level of the first form between form :: open and form :: close please excuse me for the Disturbance.

Baptiste left a reply on Confirmation White SweetAlert

{{ Form::open(['route' => ['materiel.destroyMateriel', $materielAtt->id], 'method' => 'delete']) }} {{ Delete }} {{Form::close() }}

Baptiste left a reply on Confirmation White SweetAlert

Ah excuse me..

{

{{ Form::open(['route' => ['materiel.destroyMateriel', $materielAtt->id], 'method' => 'delete']) }} Delete {{Form::close() }}

}

Baptiste started a new conversation Confirmation White SweetAlert

Hello, Here is my view, when I carry out the deletion it works but I will like to change the form and use sweetAlert. I have all installed but it seems more complicated to carry out the confirmation voila what I do :

{ @include('flash')

            <thead>
                <tr>
                    <th>Numéro de série</th>
                    <th>Nom gemini</th>
                    <th>Constructeur</th>
                    <th>Modele</th>
                    <th>Poids</th>
                    <th>action</th>
                    
                </tr>
            </thead>
            <tbody>
                @foreach ($materielNS as $materielAtt)
                <tr>
                    <td>{{ $materielAtt->numSerie}}</td> 
                    <td>{{ $materielAtt->nomGemini}}</td> 
                    <td>{{ $materielAtt->constructeur}}</td> 
                    <td>{{ $materielAtt->modele}}</td>
                    <td>{{ $materielAtt->poids }} kg</td> 
                    <td>
                        {{ Form::open(['route' => ['materiel.destroyMateriel', $materielAtt->id],

'method' => 'delete']) }} Delete {{Form::close() }} @endforeach

                    </tbody>
                    <script>
                    $(document).on('click', '.button', function (e) {
e.preventDefault();
var id = $(this).data('id');
swal({
        title: "Are you sure!",
        type: "error",
        confirmButtonClass: "btn-danger",
        confirmButtonText: "Yes!",
        showCancelButton: true,
    },
    function() {
        $.ajax({
            type: "POST",
            url: "{{url('/destroy')}}",
            data: {id:id},
            success: function (data) {
                         
                }         
        });
});

});

        <a class="btn btn-info" href="{{route('materiel.createMateriel', $materiel)}}">Créer</a>
        

}

Here is what I base myself on: http://stackoverflow.com/questions/40579520/delete-method-with-sweet-alert-in-laravel. But it does not even show me the alert..

I need help please any help would be appreciated..

09 Feb
2 years ago

Baptiste left a reply on SweetAlert White Laravel 5.3

Thank you very much and it works well on Laravel 5.3 ?

Baptiste started a new conversation Change The Color Of A Pie With Chart.js

Hello,

is it possible to change the color of a pie with chart.js ? Apparently is possible but quite complicated according to the documentation.

Has anyone succeeded ?

Part : Chart Examples : Pie https://erik.cat/projects/Charts/docs/4

08 Feb
2 years ago

Baptiste started a new conversation SweetAlert White Laravel 5.3

Hello

I try to use sweetAlert but the installation I can not display one. Is it still in service ?

https://github.com/uxweb/sweet-alert

When I am in the use part of the documentation nothing appears.

The steps I do :

1 - composer require uxweb/sweet-alert

2-'providers' => [ UxWeb\SweetAlert\SweetAlertServiceProvider::class ];

3-'aliases' => [ 'Alert' => UxWeb\SweetAlert\SweetAlert::class ];

4- use Alert; (In HomeController)

5- Alert::message('Robots are working!'); return view home...

I think I'm hurting the installation while I'm doing what I'm told but maybe I'm wrong can you help me please ?

07 Feb
2 years ago

Baptiste started a new conversation Change The Color Of A Pie With Charts

Hello,

In the documentation of charts to paragraph of tart apparently one can not change the colors of the table finally if but it to the air complicated according to the documentation. Would someone have succeeded ?

Title : Chart Examples - Pie

url : https://erik.cat/projects/Charts/docs/4

Baptiste started a new conversation Create A Mail Form With Mailto

Hello, I have some difficulty to create a form in a table with mailto voila what I have done but with blade I have some difficulty in order to realized my message. Any help would be appreciated please

Here is what I have but it is in html and it is not terrible :

{

 Bonjour Patrice, Le numéro de série est {{$materielAtt->numSerie}} Le nom Gemini est {{$materielAtt->nomGemini}} Le constructeur est {{$materielAtt->constructeur}} Le modèle est {{$materielAtt->modele}} Le poids est de {{$materielAtt->poids}}kg

cordialement,

xxxxxxx

}

This is what I tried but I barely realized my message because it returns me a text error...

{

{{ Form::open(['method' => 'GET', 'url'=>'mailto:[email protected]']) }} {{Form::hidden('objet', 'Informations déchets') }} {{Form::textaera('corps', 'Bonjour Patrice' 'Le numéro de série est'{!!$materielAtt->numSerie!!} 'Le nom Gemini est'{!! $materielAtt->nomGemini!!} 'Le constructeur est'{!!$materielAtt->constructeur!!} 'Le modèle est' {!!$materielAtt->modele!!} 'Le poids est' {!!$materielAtt->poids!!}'kg'

'cordialement'

'xxxxxxx', ['size' => '30x5']) }}) {{Form::input('submit','Envoi')}} {{Form::close() }} @stop

}

06 Feb
2 years ago

Baptiste left a reply on Sends Mail When I Create New Hardware

I should receive an email on mailtrap no ?

Baptiste started a new conversation Sends Mail When I Create New Hardware

Hello, I develop a site that can handle computer waste and when I put in my table a new waste this must go prevent the computer park I thought so do with events. And here is what I do concretely.

Here is my event :

Baptiste left a reply on How To Create Graphic And Diagrams

Yes I have already tried with charts but it returns me this error :

Unknown chart library / type combination (With a sign above that contains an exclamation point.)

I followed the same instructions as in the video :

Https://www.youtube.com/watch?v=KrAvrU2XYuY

I looked at the documentation and I tried with all versions yet it always returns me the same error..

Baptiste left a reply on How To Create Graphic And Diagrams

At first I tried to install chart js but the installation did not work. I'm looking for the same kind of design and what I'm trying to do more accurately is a pie chart.

Thank you for your answers.

05 Feb
2 years ago

Baptiste started a new conversation How To Create Graphic And Diagrams

How to create graphic diagrams and any other representation of this kind please?

04 Feb
2 years ago

Baptiste started a new conversation Problem With Charts

Hello, I try to install charts in my project on laravel 5.3 but when I finish all installed and set up the different configurations voila what I receive:

Unknown chart library / type combination (With a sign above that contains an exclamation point.)

I followed the same instructions as in the video:

Https://www.youtube.com/watch?v=KrAvrU2XYuY

And yet I adapted well according to the version for example for setValues ​​now gives values ​​when I declare my chart in home controller. In addition I have access to my class charts because instead of using use Chars I put use ConsoleTVs \ Charts \ Facades \ Charts; Would you have any ideas to solve this problem please ?

03 Feb
2 years ago

Baptiste left a reply on Display Problem With Values

It is almost that except that I want to insert this column in a table and the result at the level of the display shows me:

["ABDJCF45", "IODLFLFOEL45", "IDKLDPLDPD45"]

In the first row of my column

02 Feb
2 years ago

Baptiste started a new conversation Display Problem With Values

Hello I want to display the values ​​according to the foreign key of the user. It almost works with this instruction :

{{ $materiel->where('site_id', auth()->user()->site_id)->value('numSerie') }}

But in my debugbar when I see the result I see this:

Select numSerie frommateriels where site_id = '6' limit 1

How do I get rid of limit 1? Because otherwise it would work..Or perhaps there is another way of

doing?

31 Jan
2 years ago

Baptiste started a new conversation How To Create 3 Different Sites Using Foreign Key

Hello everyone, I realized a site with different tables such as:

  • website
  • user -equipment -peripheral

This site is currently available only for one city or I was asked to create this site for three different cities. Recreating 3 times the same tables does not help me so I will reference my site in each table using a foreign key. But after how can I make to display the desired website according to the foreign key ?

At the level of my code I have nothing to offer you for now because I do not see how to do.

28 Jan
2 years ago

Baptiste left a reply on Field With Two Values

In fact my internship tutor wants to retrieve certain attributes from another database by name or number. For that it wants a field that would allow him to return either the number for all to recover or the name. We would therefore have a field with two values ​​normally not. Is this possible already ?

Baptiste started a new conversation Field With Two Values

Hello I want to create a field where I can indicate two values ​​such as serial number and age. For example if I indicate the age only ca validate without problem and if I will indicate the serial number only ca would validate too. Simply a field that would allow me to validate either one without any problem. Is it possible ?

27 Jan
2 years ago

Baptiste left a reply on Field That Retrieves The Value

Thank you for your help

Baptiste left a reply on Field That Retrieves The Value

With disabled I can not retrieve the value. Does there exist a syntax that would recover a value without being able to modify it? Because I would like to retrieve my value in a field without being able to modify it and then insert it in a table.

Baptiste started a new conversation Field That Retrieves The Value

Hello :) Can I make a field non-editable while Recovering value?

26 Jan
2 years ago

Baptiste started a new conversation How To Display The Attribute Of A Collection In A Label Field

hello,

To retrieve a value from a field contained in another table I do this :

{

$periCons = DB::table('gemini.peri_bs')->select('constructeur')->where('numSerie', $numSerie->numSerie)->get(); }

And in my form to display the attribut i do :

{

{!! Form::label('constructeur', 'constructeur') !!} {!! Form::label('constructeur', $periCons->pluck('constructeur') , ['class' => 'form-control']) !!}

}

But in the display of my field ca gives :

["SNCF"]

Can I only retrieve the attribute without the array ?

25 Jan
2 years ago

Baptiste left a reply on Check If An Attribute Is Not Already In A Collection

It doesn't work with has() or contains()..

I have done different tests but my equality is still not taken into account while theoretically this should .. Could you help me please ?

24 Jan
2 years ago

Baptiste started a new conversation Check If An Attribute Is Not Already In A Collection

Hello, I would like that when I enter a serial number that ca recovers me the different attributes of another database. I have two database on which I work and dechetinfo and the other of which I wish to retrieve the attributes is called gemini.

My plan is to retrieve the serial number that I send at the field level and compare it to the gemini table collection which also contains a serial number list. And if the tie and check then I return false. (False and just to serve as a test) My problem and test the equality in fact I can not do it ..

public function storePeri(Request $request) {

    $periB = new PeriB(); 
    
    $periB->numSerie=$request->get('numSerie');
    $periG = DB::table('gemini.peri_bs')->get(['numSerie']); 

    $periG->each(function ($periG, $key)  use($periG,$periB) {
        if ($periB == $periG) {
            return false;
        }
        else
        {
        echo $periG.", ";
        
        }
    });
   
    return redirect(route('besancon.peri.indexPeri'))->with('success','Le déchet à bien été créer');
}
23 Jan
2 years ago

Baptiste left a reply on How To Retrieve Information About Other Database

Yes thank you very much, only I'm not sure about understanding everything ..

Baptiste started a new conversation How To Retrieve Information About Other Database

Hello,

i have two base on mysql one that calls waste and another geminii, how can I retrieve the information from the geminii table to the waste table in the view ?

Concretely I have to fill a field in my view and then it must be able to complete the form using the information to retrieve in the gemini database.

Could you help me please?

22 Jan
2 years ago

Baptiste started a new conversation Insert Multiple Values ​​in An Array With Integer Drop-down Lists

Hello, I am currently working on a site that needs to be able to manage computerized waste. I have divided the waste into different parts such as peripherals and other. In the other part I want to insert a keyboard, a mouse and other elements several times using an integer drop-down list from 1 to 10. For example i will check keyboard, its weight and indicate the number of times I want to see it fit into the table. I do it very well to record it once but I can not find solutions to record it several times according to the indicated number. Do you have any ideas please ?

Here is the code for the add form

{ @extends('admin/layout') @section('content')

Ajouter un nouveau déchet

{!! Form::open(['url' => route('besancon.autre.storeAutre')]) !!}

{!! Form::label('Clavier') !!}{!! Form::checkbox('nomGemini', 'clavier', false) !!} {!! Form::label('Poids') !!}{!! Form::checkbox('poids', 2, false) !!} {!! Form::label('nombre','Nombre') !!}{!! Form::select('number', [1,2,3,4,5,6,7,8,9,10], ['class' => 'form-control']) !!}

Ajouter plusieurs déchets

{!! Form::close() !!}

@stop }