distantplanet

distantplanet

Member Since 4 Years Ago

Experience Points 11,525
Experience
Level
Lessons Completed 213
Lessons
Completed
Best Reply Awards 0
Best Answer
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.

12 Jun
5 months ago

distantplanet started a new conversation Laravel Valet With Freedom.to

Hi, Does anyone have experience using the content blocking app Freedom.to with Laravel Valet?

It's handy time management tool for blocking distracting websites and apps. The only problem is also stops me from loading sites with Valet.

Thanks.

02 May
6 months ago

distantplanet started a new conversation PJAX And Loading Full Calendar

I'm using PJAX https://github.com/spatie/laravel-pjax

And Full Calendar https://github.com/maddhatter/laravel-fullcalendar

The way to display the calendar is with this:

{!! $calendar->script() !!}

It works fine when i go directly to the page URL but doesn't load when i navigate there through PJAX.

Normally i would put scripts in the following function to reload with PJAX but I can't do it with the calendar script function since it includes the script tags.

$(document).on('pjax:complete', function(event) {

}

Thank you!

02 Dec
11 months ago

distantplanet started a new conversation Creating A Schedule/calendar

I need to create a calendar where user's can reserve time slots. The time slots cannot overlap.

Each time slot needs to be stored in a DB table or be linked to a DB table for an associated post.

There seems to be a lot of different ways to do this so i'm mostly seeking advice on the best way to go about this. Any recommendations of frameworks or libraries that would be best for this would be appreciated! Also any related tutorial would also be helpful.

Thanks!

27 Nov
11 months ago

distantplanet started a new conversation Do I Need One DB Table/Model Or Should They Be Seperate?

I'm working on a website that consists of three main parts: An internet radio station, an (irl) events listing and an archive of recording from both the radio broadcasts and events.

These two components overlap in a lot of ways because some of the events are also broadcasted on the radio (but not all events are broadcasted and not all broadcasts are events)

Any of them have the option to be archived with audio recordings from the event or broadcast.

Radio broadcasts cannot overlaps as this is how DJs reserve time slot and see what times are available but Events can be at the same time as other events since they're often at different locations.

What i'm stuck on is whether it would be best to have one post type for both (with booleans such as isBroadcast and isEvent and all necessary fields for both types) or should i have separate DB tables and models for each.

Such as

Broadcasts: Title, date/time, description, image, audio_streaming_url, video_streming_url

Events: Title, date/time, description, image, venue, price

or just

Post: Title, date/time, description, image, isEvent, isBroadcast, streaming_url, video_streaming_url, venue, price

Having Broadcasts and Events the same as the Database table/Model seems easiest for the instances when the post is both a Broadcast and Event and also easier for Archiving because i could simply create archive post with post_id as a field.

Such as

Archive: Post_id, soundcloud_link, youtube_url, additional_text

But having a single post type would make it confusing in regards to reserving time slots for the radio broadcasts since the Events can overlap but the radio broadcasts cannot.

Or is this pointless to think too much about as i'm sure either way would work?

04 Aug
3 years ago

distantplanet started a new conversation Using Production DB In Local ENV

I built a site locally with some dummy data and pushed it to production. there's still some work to be done but since i have people adding content to it now, it'd be nice to access that DB when i 'm working locally.

I entered the credentials to my production DB in the .env file but it won't connect. what am i missing?

thanks

distantplanet started a new conversation Formating Textfield

I have a form with a textfield that saves into my db and i want to display that text on the website.

what is the best way to format the text? is there a good library for this? mainly line breaks but other styling options (like a blog style post) would be nice too.

01 Aug
3 years ago

distantplanet left a reply on [UPDATED] Multiple Jplayers From Laravel DB

UPDATED. Is there any way to mark this unanswered?

distantplanet left a reply on Creating Multiple Jplayers From Laravel DB

I thought i had it but it's loading the same audio file for each player...also i have trouble when i navigate deeper into the website. ex: with mydomain.com/segments/ the audio player adds segments to the url instead of just the public directory. I know a similar issue can be solved with the URL:asset, but i'm not sure how to with this since it's the jquerry that's getting the file.

Sorry i know this is not entirely Laravel but it's where the jQuerry and Laravel overlap that's really confusing me!

Home page View

<div id="latest">
        <!--  {{ $count = 2}} -->
    @foreach ($archives as $archive)
            <div class="singleLatest">
                <p>{{{$count}}}</p>
                <img src = "/images/segments/{{$archive->segment->image}}" width="100px;"/>
                <div class="playerAndInfo">
                    <h3> {{ $archive->archiveTitle}}<br>{{$archive->segment->name}}<br>{{ $archive->dateAired}}   </h3>
                    <div id="jquery_jplayer_{{$count}}" class="jp-jplayer"></div>
                    <div id="jp_container_{{$count}}" class="jp-audio" role="application" aria-label="media player">
                    <div class="jp-type-single">
                    <div class="jp-gui jp-interface">
                    <div class="jp-controls">
                        <button class="jp-play" role="button" tabindex="0">play</button>
                    </div>
                    <div class="jp-progress">
                        <div class="jp-seek-bar">
                            <div class="jp-play-bar"></div>
                        </div>
                    </div>

                    <div class="jp-time-holder">
                        <div class="jp-current-time" role="timer" aria-label="time">&nbsp;</div>
                        <div class="jp-duration" role="timer" aria-label="duration">&nbsp;</div>
                    </div>

                    <div class="jp-no-solution">
                        <span>Update Required</span>
                    To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
                    </div>
                    </div>
                    </div>
                    </div>
                </div><!--end playerAndInfo-->
            </div> <!-- end single latest -->

   <!--  {{ $count = $count +1}} -->
        @endforeach

</div><!-- End latest -->

Creating Jplayers from DB


    <!--{{{$counter = 2}}}-->
        @foreach ($archives as $archive)

            <script>
            var counter = "{{$counter}}";
            var file = "archiveAudio/{{{$archive->audioFile}}}";

        $(document).ready(function(){
        $("#jquery_jplayer_"+ counter).jPlayer({
            ready: function () {
                $(this).jPlayer("setMedia", {
                    title: "Hidden",
                    mp3: file,
                    oga: ""
                });
            },
            play: function() { // To avoid multiple jPlayers playing together.
                $(this).jPlayer("pauseOthers");
            },
            swfPath: "../../js",
            supplied: "mp3, oga",
            cssSelectorAncestor: "#jp_container_" + counter,
            wmode: "window",
            globalVolume: true,
            useStateClassSkin: true,
            autoBlur: false,
            smoothPlayBar: true,
            keyEnabled: true
        });
       counter ++;

        });


            </script>

        @endforeach


31 Jul
3 years ago

distantplanet started a new conversation Form Binding For Select Input

I have a form for creating a new "segment" with a Select option for "city" that is being populated with a foreach loop from my db.
(eloquent relationship is set up -- segment belongs to city / city has many segments)

it all works fine except when i edit the "segment" the form-binding is not populating the select input. though it's working with my text inputs.

I'm using the form facade for my other inputs but couldn't figure out how to include my for loop in it so i've used the html select. I've been searching hard for this and can't seem to find a solution for my situation.

edit.blade.php ''' {!! Form::model($segment, ['method' => 'PATCH', 'files' => true, 'action' => ['SegmentsController@update', $segment->id]]) !!} @include ('segments.form', [ 'submitButtonText' => "Edit Segment"])

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

form.blade.php '''

{!! Form::label('city', 'City:') !!}
Select A City @foreach ($cities as $city) id}}"> {{$city->name}} @endforeach '''

segmentsController.blade.php ''' public function edit ($id) { $segment = Segment::findOrFail($id); $cities = City::latest('id')->get();

   return view('segments.edit', compact('segment','cities'));

} '''

thanks!

28 Jul
3 years ago

distantplanet started a new conversation Creating Multiple Jplayers From Laravel DB

This Jquery Code sets the media for a new instance of a jPlayer. Is it possible to put a laravel foreach loop around it like this to set multiple instances of the player from a laravel DB?

I'm adding the count to the jplayer instance ID and and setting the mp3 to a file in my database but they brackets throw of the jquerry. is there a way to escape them or am i going about this the wrong way?

@foreach ($archives as $archive)
$count = 2

$(document).ready(function(){
        $("#jquery_jplayer_{{$count}").jPlayer({
            ready: function () {
                $(this).jPlayer("setMedia", {
                    autoPlay: true,
                    title: "Live Stream",
                    mp3: "archives/{{archive->audioFile}}"
                }).jPlayer("play");
            },
            play: function() { // To avoid multiple jPlayers playing together.
                $(this).jPlayer("pauseOthers");
            },
            swfPath: "../../js",
            supplied: "mp3, oga",
            wmode: "window",
            globalVolume: true,
            useStateClassSkin: true,
            autoBlur: false,
            smoothPlayBar: true,
            keyEnabled: true
        });

Thanks!

27 Jul
3 years ago

distantplanet started a new conversation Admin Customizable Background IMG

what's the basic approach for having a admin customizable background image?

i have a form set up to upload a new background image and save the name to a db.

now i'm wondering where i connect the database call for the image name to the CSS so it works on every page.

21 Jul
3 years ago

distantplanet left a reply on Index Of / (phpinfo.php Only File Listed) - Laravel 5/Forge/Digital Ocean

Thanks! that pointed me in the right direction, definitely a DNS issue...

20 Jul
3 years ago

distantplanet left a reply on Index Of / Page (phpinfo.php Only File Listed) - Laravel 5/Forge/Digital Ocean

it's worked intermittently. after only seeing the index of / page for a few hours it started showing my page again for a couple minutes but with some issues with images not loading (when i refresh a couple times the show up)

distantplanet started a new conversation Laravel 5 / Forge / Digital Ocean -- My Sites Not Showing Up

I've been trying to deploy a Laravel 5 site with Forge and Digital Ocean and have been running into some difficulties

i keep getting a page that says

Index of / and the only file listed is phpinfo.php

so it seems like it's not finding my index.php file but the thing that's stumping me is the site works fine intermittently (everything was working for about 5 minutes and then i tried again without changing anything and it was back to the index of / page.

also, when i ssh into digital ocean server all of the files are there and i'm also able to connect to the database with sequalPro so it seems like it's deploying ok?

any help would be appreciated, thanks!