mac03733

mac03733

Member Since 7 Months Ago

Experience Points 4,080
Experience Level 1

920 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 1
Lessons
Completed
Best Reply Awards 3
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.

06 Feb
1 week ago

mac03733 left a reply on Return Count: 0 If Nothing Was Found

@MARTINZELTIN - can i see your table structure

mac03733 left a reply on Return Count: 0 If Nothing Was Found

what exactly are you trying to do

mac03733 left a reply on Return Count: 0 If Nothing Was Found

@MARTINZELTIN - try

$sms_count = SentItems::selectRaw('SenderID')
                      ->whereIn('SenderID', ['modem1', 'modem2', 'modem3', 'modem4', 'modem5'])
                      ->whereBetween('SendingDateTime', [$date_from . ' 00:00:00', $date_to . ' 23:59:59'])
                      ->groupBy('SenderID')
                      ->count();

mac03733 left a reply on Return Count: 0 If Nothing Was Found

try

$sms_count = SentItems::
                      whereIn('SenderID', ['modem1', 'modem2', 'modem3', 'modem4', 'modem5'])
                      ->whereBetween('SendingDateTime', [$date_from . ' 00:00:00', $date_to . ' 23:59:59'])
                      ->groupBy('SenderID')
                      ->count();

->count() should return the number of items matching the query even if its 0

mac03733 left a reply on How To Pass Multiple Variable Throuth Route

@TANVEERKHANWD - your route needs a bit of tweaking

<a href="
    {{ route('media.edit',['media' => $results->id, 'type' => $type]) }}">
    <i class="fa fa-fw fa-edit"></i>
</a>

mac03733 left a reply on How To Pass Multiple Variable Throuth Route

in your blade file you will have somthing like

<a href="{{  route('media.edit',['media' => $value_u_want_1, 'type'=> $value_u_want_2]) }}">Visit Edit Media</a>

Hope that helps

05 Feb
1 week ago

mac03733 started a new conversation Logging Errors On Production Server

can anyone recommend the best free way to keep track/log errors users may or may not report

21 Jan
3 weeks ago

mac03733 started a new conversation SSL + Laravel Project + Digital Ocean

Hi guys .. i just activates the COMODO PositveSSL certificate using DNS method on name cheap ...it says its active ..

but the site is still saying not secure .. wat am i missing.

i am using digital ocean and namecheap incase relevant.

15 Jan
1 month ago

mac03733 left a reply on Return User To Page They Logged In From

@SNAPEY - the answer marked as Best on that thread ..is VERY good #BUT it may cause the application to crush if the last url accessed before trying to login is a result of a search query

09 Jan
1 month ago

mac03733 left a reply on Product Launch Preparation "your Experience"

thanks for the reply ..you'v given me somthing to look on ..am totally new to this.

u mentioned Laravel Forge, iv been setting up my servers manually all along and using git hooks for zero down time,

--> besides deploying for me and free ssl ,

does it cover server maintenance , or maybe backups

if not ,whats your advise on that

08 Jan
1 month ago

mac03733 left a reply on Sequel Pro Stuck On Loading Database “db_name"

for now iv

uninstalled sequel pro

and installed

sequel-pro-nightly #####brew cask install homebrew/cask-versions/sequel-pro-nightly

seems to be working so far ...

for more info you can read up on the link provided by @realrandyallen

https://github.com/sequelpro/sequelpro/issues/2699#issuecomment-421767625

a couple of solutions where suggested ..just choose whichever suits u

mac03733 left a reply on Sequel Pro Stuck On Loading Database “db_name"

@REALRANDYALLEN - mysql v8.0 ... let me try reseach if downgrading would come back to bit me in th ***

07 Jan
1 month ago

mac03733 left a reply on Sequel Pro Stuck On Loading Database “db_name"

@realrandyallen ..those where th first thing i tried ,,,,didnt work for me ...thanks though

mac03733 started a new conversation Sequel Pro Stuck On Loading Database “db_name"

after selecting database ..sequel pro just gets stuck on loading database ...

mac03733 started a new conversation Product Launch Preparation "your Experience"

dont know how to best phrase this ..so please bare with me ...

assuming you'v created a laravel project such as QuickBooks or any large project, what steps or preparations does one need to consider for successful launch and maintenance

EG.. .in terms of :

-> customer support *considering chatbots

-> testing *plan to have Alpha ( 2 weeks ) and beta (1 month )

-> Hosting *currently using digital ocean

even info . on common mistakes and how to avoid them.

hopefully someone understands what am trying to ask ... any help would be much appreciated

12 Dec
2 months ago

mac03733 left a reply on Laravel Does Not Display Images In The View From Storage Folder

DID YOU DO

php artisan storage:link

thn i recomend you use this syntax

 <img src="{{ asset('storage/cover_images/'. $book->image) }} ... >

as suggested by @markll

30 Nov
2 months ago

mac03733 left a reply on How To Find Number Of Mondays (or Any Particular Day) In A Month?

HERE IS A QUICK SOLUTION ..there are probably cleaner ways ...but this works perfectly

function numberofDays($dayName,  $monthName, $year ){

//$dayName = "monday";
//$monthName = "december";
//$year = "2018";

$month_number = date("m",strtotime($monthName)); //converts the month to a number
$numberOfDays=0;
  
 $month_day_in = date("m", strtotime("first ".$dayName." ".$year."-".$month_number));
if($month_day_in == $month_number){  //check if the following $dayName is in $monthName 
  
 $numberOfDays++;
}

 $month_day_in = date("m", strtotime("second ".$dayName." ".$year."-".$month_number));
if($month_day_in == $month_number){
  
  $numberOfDays++;
}

 $month_day_in = date("m", strtotime("third ".$dayName." ".$year."-".$month_number));
if($month_day_in == $month_number){  
  
  $numberOfDays++;
}

 $month_day_in = date("m", strtotime("fourth ".$dayName." ".$year."-".$month_number));
if($month_day_in == $month_number){
  
  $numberOfDays++;
}

 $month_day_in = date("m", strtotime("fifth ".$dayName." ".$year."-".$month_number));
if($month_day_in == $month_number){  
  $numberOfDays++;
}

    return $numberOfDays;
}

mac03733 left a reply on Issue With Gitignore When Pushing Laravel Site To Server

on your server ..try running the following command

php artisan storage:link

then try upload

29 Nov
2 months ago

mac03733 left a reply on How Do You Deploy Your Laravel Project To Your Self Hosted Server?

THE ANSWER TO YOUR IS QUESTION DEFINITELY HERE

--> https://devmarketer.io/learn/deploy-laravel-5-app-lemp-stack-ubuntu-nginx/

what u are looking for starts at STEP 11

but u can consider reading the other steps just for better understanding of th setup

mac03733 left a reply on Laravel Style File

i would be helpful if u showed some code on how u implemented this ...

have you tried running

npm run dev

assuming you imported ur styles file into app.scss

28 Nov
2 months ago

mac03733 started a new conversation Charts And Graphs

can anyone recommend a way or best package to implement graphs or charts in laravel .

05 Nov
3 months ago

mac03733 started a new conversation Calendar Show Events Based On DB ( RECOMMEND)

can someone recommend an easy to implement but good calendar that can allow me to show events on th calendar based on dates from the database

01 Nov
3 months ago

mac03733 left a reply on Need To Learn Date Range Filter In Laravel

#####so which date picker is recommended !

22 Oct
3 months ago

mac03733 left a reply on Server Concern "Digital Ocean"

@click

and create a "snapshot" of your server before you do this. This way you can easily switch back to the previous settings if something does fail and you are unable to fix or rollback it in short time.

ya ill definitely look into that ..sounds handy

mac03733 started a new conversation Server Concern "Digital Ocean"

i have a digital ocean droplet ..and every time i log onto it there is always an update was wondering if it is really necessary for me to keep updating it .or if there is a way this can just be make automatic ..or perhaps someone could point me to a good serve management tutorial

thanks

18 Oct
3 months ago

mac03733 left a reply on What Am I Doing Wrong? Arrrgggh Trying To Get Property Of Non-object

try this ...

UserController

public function show(User $user)
    {
        return view('user')->with('user',$user);
    }
15 Oct
4 months ago
04 Oct
4 months ago

mac03733 left a reply on Get Records From Db BUT Without Repeating A Specific Column

solutions i ended up with

$users = DB::table('users')
        ->select('id','name', 'email')
        ->get();

foreach($users->unique('name') as $user){
  //....
}

or

$users = User::groupBy('name')->get();
       

mac03733 left a reply on Get Records From Db BUT Without Repeating A Specific Column

@petritr the structure of the DB is perfect ..i expect it to repeat the value. what i need help with is wat i stated in the question

please let me know in case the question is not clear , THANK 4 attempt though

mac03733 left a reply on [Vue Warn]: Unknown Custom Element: <example-component> - Did You Register The Component Correctly?

and go to where u import your app.js ...if there is a defer attribute on the script tag .remove the "defer" ..

recompile and test

mac03733 left a reply on [Vue Warn]: Unknown Custom Element: <example-component> - Did You Register The Component Correctly?

can u also check your browser console and see if there is any message

mac03733 started a new conversation Get Records From Db BUT Without Repeating A Specific Column

is there some fancy laravel / eloquent way of doing what th question states.

assuming i have a column named 'bluh' , if "bluh" has a reapeating value accross other rows ..only get one

27 Sep
4 months ago

mac03733 left a reply on {{ __('web.name') }} Syntax ?

does the "web." point to some file or smothing

mac03733 started a new conversation {{ __('web.name') }} Syntax ?

can someone tell me what that syntax implies /or does

12 Sep
5 months ago

mac03733 left a reply on How To Use Registration Form For Two Tables

@Sergiu17 .. i was just passing by ...like the way u answer ... please keep it up

03 Sep
5 months ago

mac03733 left a reply on Inserting Values Into Foreign Key Table And Primary Key Table

have u considered doing it this way

  1. this line , u can remove it
$table->foreign('thief_id')->references('id')->on('thieves');

then in Thieves model hav somthing like

public function cars(){
    return $this->hasMany('App\Car');
}

then in cars model add somthing like

public function cars(){
    return $this->belongsTo('App\Thief');
}

then when u save a car u can give it the primary key of the thief as a foriegn key

you can look add laravel relasionship documentation for bettter understanding

Hope that helps

30 Aug
5 months ago

mac03733 left a reply on Vhost ?? Php Artisan Serve ????

so are there specific projects that require

php artisan serve

because i only started using it when i cloned a project and all it showed was a blank page when i try

127.0.0.1/appfolder/public

but worked whn i used

php artisan serve

mac03733 started a new conversation Vhost ?? Php Artisan Serve ????

wat is need for using ... vhost or php artisan serve . so far i have just been using 127.0.0.1/appfolder/public

am on laravel5.6 and using xamp

29 Aug
5 months ago

mac03733 started a new conversation Laravel5.6 + Vue + Vuex + Vue-router

hi ..i just started learning laravel about 2 months back .. and now i need to combine with vue + vuex + vue-router ..can someone recommend material or a good tutorial implementing all those in laravel ..

thank you.. nd love the support newbies get from this community .. really makes the learning easier

mac03733 left a reply on Create A New Table Or Store In Same

i would go for one table. My reasoning being you dont hav to query multiple tables if u need data about several states and its much easier to manage

hope i understood ur question nd the answer is helpful

24 Aug
5 months ago

mac03733 left a reply on Laravel 5.6 + Materialize | Mdbootstrap Without Removing Bootstrap 4

i know the question might sound silly to those of you used to this .. but can i please get some help ..THANK U

mac03733 started a new conversation Laravel 5.6 + Materialize | Mdbootstrap Without Removing Bootstrap 4

hi guys, newbie here ... am trying to start using material design for my projects .. for some reason its not as easy as i thought it would be. can someone please advice on how to setup materialize without having to remove bootstrap preferably using npm

as a side question ..which would u recommend materialize vs mdbootstrap

23 Aug
5 months ago

mac03733 left a reply on What To Do After NPM ?

@tykus thanks... i only used the first import.and it works ............ to avoid asking again the next time i do an npm install

is it basically the same set of steps for everything ...

for example assuming i do something like

npm install datatable

mac03733 started a new conversation What To Do After NPM ?

already feeling silly as i ask this question ..

i just ran "on laravel 5.6"

npm install mdbootstrap

now what do i need to do to be able to start using it use it..

22 Aug
5 months ago

mac03733 left a reply on No Debug Page ( Debug Is True )

Sweet .. php artisan config:clear solved it . thanks for the help guys