rin4ik

FULL-STACK DEVELOPER at DXCX

Member Since 3 Years Ago

24 y.o. Ferghana, Uzbekistan

Experience Points
276,870
Total
Experience

0 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
1410
Lessons
Completed
Best Reply Awards
200
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 50
276,870 XP
May
16
1 month ago
Activity icon

Replied to Why Do My Tests Run So Slow?

phpunit.xml file use sqlite in memory database

        <env name="APP_ENV" value="testing"/>
        <env name="BCRYPT_ROUNDS" value="4"/>
        <env name="CACHE_DRIVER" value="array"/>
        <env name="MAIL_DRIVER" value="array"/>
        <env name="DB_CONNECTION" value="sqlite"/>
        <env name="DB_DATABASE" value=":memory:"/>
        <env name="QUEUE_CONNECTION" value="sync"/>
        <env name="SESSION_DRIVER" value="array"/>
        <env name="TELESCOPE_ENABLED" value="false"/>
        <env name="SCOUT_DRIVER" value="null"/>

.env.testing file

DB_CONNECTION=sqlite
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=:memory:
DB_USERNAME=homestead
DB_PASSWORD=secret

before test try to clear the config

php artisan config:clear

is this TestsTenant your own trait ?

in TestCase class you can call artisan commands like here and it will run them only once

  public function setUp(): void
    {
        parent::setUp(); 
        Artisan::call('migrate'); 
        Artisan::call('db:seed'); 
        Artisan::call('config:clear');
    }
Mar
11
4 months ago
Activity icon

Replied to AJAX ERROR NOT FOUND OR FORBIDDEN

basically u understand what i am trying to keep this for now

  $this->middleware('auth')->except(['search']);

and try changing url and debug why it doesnt hit url.

Activity icon

Replied to AJAX ERROR NOT FOUND OR FORBIDDEN

ok change this

 public function __construct()
    {
        $this->middleware('auth')->except(['search']);
    }

and use this like you did before when u had 403 forbidden

url : "{{ URL::to('search')}}",
Activity icon

Replied to AJAX ERROR NOT FOUND OR FORBIDDEN

send me your full controller coed I think it can find it

Activity icon

Replied to AJAX ERROR NOT FOUND OR FORBIDDEN

did that hit your search method now ? check and see what you get response

public function search(Request $request){

dd('something')

you should get response as something

Activity icon

Replied to AJAX ERROR NOT FOUND OR FORBIDDEN

check again network tab and generated url. it should be the same like in your route file

Activity icon

Replied to AJAX ERROR NOT FOUND OR FORBIDDEN

try this

$.ajax({
        type : 'get',
        url : '/retour/search',
        data :{
            search: value,
        },

        success:function( data ){
            $('#index_table').hide();
            $('#ajax_table').html( data );
        },

        error: function(jqXHR, textStatus, errorThrown) {
            console.log("AJAX Error: " + textStatus + ' : ' + errorThrown);
        },
    }); 

Activity icon

Replied to AJAX ERROR NOT FOUND OR FORBIDDEN

open network inspect tab and check your XHR request route and response what you get

Activity icon

Replied to AJAX ERROR NOT FOUND OR FORBIDDEN

maybe your route under some kinda of guard. send route file

Activity icon

Replied to AJAX ERROR NOT FOUND OR FORBIDDEN

ok got it. dont worry about token it is get request. try dd('something') in the first line of your controller method, I am wondering if it is hits the search method at all

Activity icon

Replied to Trying To Do A SUM On A Collection Result From A GroupBy

sum needs field name I think it won't get field from relation. it could be something like below but not sure you should check

  dd($groups->prescriptions->prescriptionPayment->sum('amount'));
Activity icon

Replied to AJAX ERROR NOT FOUND OR FORBIDDEN

first of all do you have route named search ? and second are you passing csrf token ?