beracah.kings

beracah.kings

Member Since 3 Years Ago

Experience Points
4,300
Total
Experience

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
13
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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
4,300 XP
Jan
20
1 day ago
Activity icon

Replied to File Storage

Thank you jlrdw. The images are of members, im saving them with random generated number stored in the db. Is this an ok practice.

Activity icon

Replied to File Storage

I created a seperate disk under

      'my_files' => [
            'driver' => 'local',
            'root'   => '/home/domain/public_html'. '/myfiles',
        ],

Im able to to view /store images inside the myfiles directory. However is it safe to follow this procedure since laravel recommends to use symbolic link. I validate and allow .jpg/png files of the particular user to upload in the myfiles directory

Jan
19
2 days ago
Activity icon

Replied to Sql Injection In Laravel

Thank you. Entire code is written with eloquent without any raw statements.

Activity icon

Started a new Conversation File Storage

Im hosting laravel in a shared server enviroment. public folder is under public_html and other files are in seperate folder.

Im unable to upload files to the public folder which I want to display. Is there any workaround to resolve this I get "League\Flysystem\Exception Impossible to create the root directory"

Jan
17
4 days ago
Activity icon

Started a new Conversation Sql Injection In Laravel

I m using eloquent for updating data. Is there any possibility of sql injection, if the form data/querystring are not sanitized.

Jan
16
5 days ago
Activity icon

Replied to Laravel Notifications

Notifications dont add a model. The count is calculated from User through eloquent. Is it possible to get count for unreadnotifications of a specific type

Jan
15
6 days ago
Activity icon

Started a new Conversation Laravel Notifications

Im fetching unread notifications in my blade file. However the count for the unread notifications is of entire table and not of particular user. Should I have to add any relationship in User model.

Jan
13
1 week ago
Activity icon

Replied to Concurrent Connections In Pusher

thank you songhua and fylzero. @ Songhua, Pusher team has replied that beyond the connection limit, an error message will be sent from pusher server and no messages will be kept in queue.

@fylzero will definetely check and revert back

Activity icon

Started a new Conversation Concurrent Connections In Pusher

Currently my application is using sandbox plan in pusher. It limits to 100 concurrent connections. My question is if the number of concurrent users increase, will it block the 101st connection or will the messages be sent on a queue.

Jan
05
2 weeks ago
Activity icon

Started a new Conversation Notification Advice

I hv a client requirement for my matrimony matching website. If a member A visits a profile of member B, the corresponding member B must get notified through a toast message in his page if he is logged in. A badge should display the number of people visited the page of member B. if member B visits his visited members page, the badge should disappeared. Can anybody guide on this. (Similiar to how gmail unread mails are displayed)

Jan
03
2 weeks ago
Activity icon

Started a new Conversation React - Laravel

Im having a pagination table with Laravel - Ajax - response is html page from ajax. Im planning to change it Laravel - React. Will the json response be faster than the htmlresponse from ajax.

Dec
20
1 month ago
Activity icon

Replied to Date Validation

@nakov thanks, never saw that one. @petrit thanks, will check and comeback

Activity icon

Replied to Date Validation


 protected function validator(array $data)
    {
            return Validator::make($data, [
                'email' => ['required', 'email', 'max:255','unique:partners'],
                'mobile' => ['required', 'min:10', 'max:10','unique:partners'],        

            ], [
                'email.required' => 'Email is required.',
                'email.email' => 'Email needs to have a valid format.',
                'email.unique' => 'Email is already registered.',
                'mobile.required' => 'Mobile Number is required.',                
                'mobile.min' => 'Mobile Number must be at least 10 characters',
                'mobile.max' => 'Mobile Number must be at least 10 characters.',
                'mobile.unique' => 'Mobile Number is already registered.',
         
           ]);
    }

This one worked for me. However numeric and min /max doesnt work when used together.

Activity icon

Replied to Date Validation

@nakov thanks for the reply. @himanshurajvanshi thank you.

Im getting the dates in the register controller. how to send error message in the register controller. how to pass custom error msgs in the validator function

Activity icon

Started a new Conversation Date Validation

im collecting date in the form of seperate select option for day, month and year. Im concatanating before updating in database. How to validate the date and send error message if any one of the select option is null

Dec
13
1 month ago
Activity icon

Awarded Best Reply on Pagination

This answer worked for me

{{ $partnerprofile->appends(request()->except('page'))->links() }}

Im appending the querystring into the url . Now its working

Activity icon

Replied to Pagination

do we have to sanitize the input, im using eloquent for data retrieval

Activity icon

Replied to Pagination

This answer worked for me

{{ $partnerprofile->appends(request()->except('page'))->links() }}

Im appending the querystring into the url . Now its working

Activity icon

Replied to Pagination

@sinnbeck if the values are in the query string, then pagination doesnt work. Only if the values are set inside the controller action then pagination works.

Activity icon

Replied to Pagination

        $gender = $request->input('gender');
        $mothertongue  = $request->input('mothertongue');
        $maritalstatus  = $request->input('maritalstatus');
        $caste  = $request->input('caste');
        $denomination  = $request->input('denomination');


        $partnerprofile2=new \App\partnerprofile;

        $partnerprofile=$partnerprofile2 
        ->when($gender, function($query, $gender) {
         $query->where('gender', $gender);
        })->when($mothertongue, function($query, $mothertongue) {
            $query->where('mothertongue', $mothertongue);
        })->when($maritalstatus, function($query, $maritalstatus) {
            $query->where('maritalstatus', $maritalstatus);
        })->when($caste, function($query, $caste) {
            $query->where('caste', $caste);
        })->when($denomination, function($query, $denomination) {
            $query->where('denomination', $denomination);
        })            
        ->paginate(10);   
        return view('search.response')->with(['partnerprofile'=>$partnerprofile]);


Activity icon

Replied to Pagination

thank you sinnbeck. if i pass values through querystring, only the first page display displays correctly, the second pagination link fetches all the data. What could be wrong.

Activity icon

Replied to Pagination

im collecting data from a form and then submitting to page, after some updates, the data is sent back. i m submitting 10 fields, so will that be odd to pass the parameters in get. can it be done through redirect

Activity icon

Replied to Pagination

im using reqular forms.

Activity icon

Started a new Conversation Pagination

im posting values to a controller function and getting results with paginate. pagination doesnt work with post request. how to resolve.

Activity icon

Replied to Multiple Where

sorry @sinnbeck i posted before refreshing the page. thank you

Activity icon

Replied to Multiple Where

@sinnbeck

could you please explain. If $a exists, then query will include $a , similiar for $b.

Activity icon

Replied to Multiple Where

i want the where condition to be appended to query when some values exists

Activity icon

Started a new Conversation Multiple Where

is it possible to use multiple where conditions in a query based on conditions.

Dec
10
1 month ago
Activity icon

Replied to Multiple Tables

@jlrdw how to handle multiple table inserts. suppose i update 4 tables, all r linked by a common reference key. 1and 2 table get updated 3 table doesnt get updated due to some error.

Dec
09
1 month ago
Activity icon

Replied to Multiple Tables

thank you tray2

Activity icon

Replied to Multiple Tables

thank you nakov. if concurrent users are creating new logins seperately, if any one of them fail, then how auto increment will work. will there be any blank values in the table

Activity icon

Started a new Conversation Multiple Tables

im updating multiple tables inside a controller function. is there a way to rollback the insert if either of the table insertion fails.

Dec
05
1 month ago
Activity icon

Replied to Data Tables

is it possible to get similiar output in laravel like yajra datatables( reduced server overhead) .

Dec
01
1 month ago
Activity icon

Replied to Data Tables

thank you jlrdw. my requirement is to display the search results in the same page. When the options are changed, the page should publish the results again with updated results.

Activity icon

Started a new Conversation Data Tables

I want to display the results in the same page as the query. How to proceed with yajra tables. guidance please

Nov
16
2 months ago
Activity icon

Replied to Sharing Data

the values are static. 4 arrays each hving 5 or 6 values.

Activity icon

Replied to Sharing Data

thanks sinnbeck. I have long list of values to be passed to a set of views. I need a way to store them in a single file that can be shared across child views.

Activity icon

Started a new Conversation Sharing Data

i have an array of values in a php file. I want to use them in the views. apart from view composers, is it possible to use them like a data in a include file

Nov
14
2 months ago
Activity icon

Replied to Unique Values

@nakov , @sinnbeck thank you so much for your time and expertise. The final one worked perfectly

Activity icon

Replied to Unique Values

'required|unique:denominations,did,' . $id,

Column not found: 1054 Unknown column 'did2' in 'where clause' (SQL: select count(*) as aggregate from `denominations` where `did2` =  somevalue

nakov, where am i doing wrong

primary key - did

columns - denomination, denominationgroup table name - denominatins

Activity icon

Replied to Unique Values

my primary key is not id, how to include in that rules

Activity icon

Replied to Unique Values

thank you nakov.

   $rules = [
            'denomination' => 'required|unique:denominations',
            'denominationgroup' => 'required',
            
        ];
        $customMessages = [
            'denomination.required' => 'Denomination is required',            
            'denominationgroup.required' => 'Denomination Group is required',            
        ];

        $this->validate($request, $rules, $customMessages);

I should be able to update both the fields but the denomination column should be unique

Activity icon

Started a new Conversation Unique Values

I have two fields in table, one of the column is unique.

In edit page, both the column values are listed in two fields. when i try to update the field that doesnt have the unique data, i get validation error for unique. how to resolve

Nov
12
2 months ago
Activity icon

Started a new Conversation Lumen

Can we use lumen for designing small websites, what major features lumen lack from laravel. Please enlighten

Nov
11
2 months ago
Activity icon

Replied to Optgroup

Thank you Sinnbeck.

Activity icon

Replied to Optgroup

hi Sinnbeck. Column Cars has values for Cars and Column Country contains the country name

Activity icon

Started a new Conversation Optgroup

Is there any way to generate values for optgroup inside unordered list from the data generated from the db. My table contains values for the cars. how to pass data for optgroup.

<select>
  <optgroup label="Swedish Cars">
    <option value="volvo">Volvo</option>
    <option value="saab">Saab</option>
  </optgroup>
  <optgroup label="German Cars">
    <option value="mercedes">Mercedes</option>
    <option value="audi">Audi</option>
  </optgroup>
</select>
Nov
05
2 months ago
Activity icon

Replied to Datepicker Issue

finally i found out the reason. thank you jlrdw for taking time to answer my queries.

Safari support a different iso format. It accepts moment().format that has T in between. Only after changing my function to pass a moment format date as parameter, datepicker works fine.

Activity icon

Replied to Datepicker Issue

datepicker works in firefox but nothing happens in ios. are there any vuedatepickers recommended for webapps

Activity icon

Replied to Datepicker Issue

if any of the previous days are disabled/readonly, datepicker doenst seems to work