chrisgrim

chrisgrim

at Self Employed

Member Since 2 Years Ago

Petaluma

Experience Points
32,570
Total
Experience

2,430 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
137
Lessons
Completed
Best Reply Awards
0
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 7
32,570 XP
Oct
26
4 days ago
Activity icon

Replied to Using Index In Vue Computed Properties?

Amazing, That helped me understand how to refactor my code a lot! Cheers

Activity icon

Replied to Using Index In Vue Computed Properties?

Oh duh sorry I missed the last part. So this shouldn't be done with computed properties?

Activity icon

Replied to Using Index In Vue Computed Properties?

Hi @piljac1

When I do

:class="shift(index)"

I get

vendor.js?id=6febdd19d9b962d4e33a:16856 TypeError: _vm.shift is not a function
Activity icon

Started a new Conversation Using Index In Vue Computed Properties?

Hi All, I want to be-able to hover over an element in a v-for and affect the element before and after it. I am trying to setup a grid so when you hover over one of the images it scales that image up and shrinks the images to the left and right.

My current method (which I am sure is very convoluted) is to add a hover.

 <div 
                                v-for="(pick, index) in staffpicks"
                                :key="pick.id" 
                                :class="shift"
                                @mouseover="hover = index"
                                @mouseleave="hover = ''">

then watch that hover and create an array

data() {
            return {
                hover: '',
		hoverArray:[],
}
}

watch: {
            hover() {
                this.hoverArray = [this.hover - 1, this.hover +1];
            }
        },

Then my plan was to use a computed method

shift(value) {
                if (index testing here using hoverArray) {
                    return 'scaleUp'
                } else {
                    return 'scaleDown'
                }
            }

to add the classes.

  1. How do I get the index in the computed property?
  2. Is there a simpler way to do this?

Thanks!!

Oct
14
2 weeks ago
Activity icon

Replied to Do I Have Always Have To Do A V-if For Empty Objects

That is what I thought about the empty object, thank you for confirming. I realized that in a different part of my code I was doing

<h3>Check out our <span> {{ category[0].name }} </span> online events</h3>

and that is what was causing the error! Thanks again @sinnbeck

Activity icon

Started a new Conversation Do I Have Always Have To Do A V-if For Empty Objects

Hi, I have the code

<h3>Check out our <span> {{ category.name }} </span> online events</h3>

//and in my scripts

data() {
            return {
                category: this.url.category ? this.url.category : {},

Normally what I have to do is add a v-if for category name like so or it will error out

<h3>Check out our <span v-if = "category.name"> {{ category.name }} </span> online events</h3>

but is there a better way to do this without having to put a v-if?

Sep
28
1 month ago
Activity icon

Started a new Conversation Need Help Refactoring In Vue

Hi, On my search page I push data to my url when the user leaves the page and I read data from the url when they arrive. I currently have it working like so

 data() {
         return {
            url: this.initializeUrl()
	

        }
    },
methods: {
        initializeUrl() {
            return {
                city: new URL(window.location.href).searchParams.get("city"),
                lat: new URL(window.location.href).searchParams.get("lat"),
                lng: new URL(window.location.href).searchParams.get("lng"),
                category: new URL(window.location.href).searchParams.get("category"),
                tag: new URL(window.location.href).searchParams.get("tag"),
                dates: new URL(window.location.href).searchParams.get("start") ? [new URL(window.location.href).searchParams.get("start"), new URL(window.location.href).searchParams.get("end")] : '',
                price: new URL(window.location.href).searchParams.get("price0") ? [Number(new URL(window.location.href).searchParams.get("price0")), Number(new URL(window.location.href).searchParams.get("price1"))] : '',
                remote: new URL(window.location.href).searchParams.get("remote"),
                mapSearch: new URL(window.location.href).searchParams.get("category"),
            }
        },
        
        addPushState() {
            if (this.url.city) {
                var city = `city=${this.city}`
            }
            if (this.data.lat) {
                var lat = `lat=${this.data.lat}`
            }
            if (this.data.lng) {
                var lng = `lng=${this.data.lng}`
            }
            if (this.data.category) {
                var category = `category=${this.data.category}`
            }
            if (this.data.dates.length) {
                var dates = `start=${this.data.dates[0]}&end=${this.data.dates[1]}`
            }
            if (this.data.price) {
                var price = `price0=${this.data.price[0]}&price1=${this.data.price[1]}`
            }
            if (this.data.tag) {
                var tag = `tag=${this.data.tag}`
            }
            if (this.data.mapboundary) {
                var mapboundary = `mapsearch=true&NElat=${this.data.mapboundary._northEast.lat}&NElng=${this.data.mapboundary._northEast.lng}&SWlat=${this.data.mapboundary._southWest.lat}&SWlng=${this.data.mapboundary._southWest.lng}&Clat=${this.center.lat}&Clng=${this.center.lng}&zoom=${this.zoom}`;
            }
            let content = `${city ? city : ''}&${lat ? lat : ''}&${lng ? lng : ''}&${category ? category : '' }&${dates ? dates : ''}&${price ? price : ''}&${tag ? tag : '' }&${mapboundary ? mapboundary : ''}`;
            history.pushState(null, null,`/index/search?${content}`)
        },

        getPushState() {

            if (this.url.category) {
                this.category = this.categories.find(element => element.id == this.url.category);
            }
            if (this.url.city) {
                this.city = this.url.city;
            }
            if (this.url.dates) {
                this.dates = this.url.dates;
                this.datesSubmit = this.url.dates;
                this.datesFormatted = this.url.dates.map(date => dayjs(date).format("ddd MMM D"));
            }
            if (this.url.tag) {
                this.tag = this.tags.find(element => element.name == this.url.tag);
            }
            if (this.url.price) {
                this.price = this.url.price;
            }
        }

Is there a way to refactor this?

Sep
25
1 month ago
Activity icon

Replied to How Do You Keep Your Scss Files Cleaned?

Oh I didnt realize that!! Ok Ill give tailwind a shot. Thanks @sinnbeck

Sep
24
1 month ago
Activity icon

Started a new Conversation How Do You Keep Your Scss Files Cleaned?

Hi, When it comes to css I find that I quickly start having a lot of unused css as I make changes to my app. I tried to be more organized this time and create a new scss file for each type of page or component on my site. However I know I have a lot of unused css hidden in the files. I looked for a program to help get rid of the css but Purge css only gets rid of it on the production public side of things. I want to get it out of my scss file if it isn't being used on the site.

Is there a tool that could help this arduous task or do I need to go line by line and check if its being used and then delete?

Sep
21
1 month ago
Activity icon

Replied to Is There A Way To Save A Query?

It is good validation that you did it the same way though :)

Activity icon

Replied to Is There A Way To Save A Query?

I just solved it myself I believe.

$firstsearch = Event::search('a')
            ->rule(EventMapSearchRule::class)
            ->with(['location', 'organizer', 'category', 'genres']);
        $searchedevents = $firstsearch
            ->paginate(8);
        $maxprice =  $firstsearch
            ->get()
            ->pluck('priceranges')
            ->flatten()
            ->pluck('price')
            ->max();

Is there any reason this is a bad way to do it?

Activity icon

Started a new Conversation Is There A Way To Save A Query?

This may be overkill but I am trying to save an extra search. I am allowing users to search through a list of events and returning a paginated list. The search looks like

 $searchedevents =  Event::search('a')
            ->rule(EventMapSearchRule::class)
            ->with(['location', 'organizer', 'category', 'genres'])
            ->paginate(8);

At the same time I want to return also get the max price of all of the events and return that as well.

$max =  Event::search('a')
            ->rule(EventMapSearchRule::class)
            ->with(['location', 'organizer', 'category', 'genres'])
            ->get()
            ->pluck('priceranges')
            ->flatten()
            ->pluck('price')
            ->max();

This is doing the same search twice. Is there a way to only search once? I was thinking I could do

$firstsearch = Event::search('a')
            ->rule(EventMapSearchRule::class)
            ->with(['location', 'organizer', 'category', 'genres'])
            ->get();
        $searchedevents = $firstsearch
            ->paginate(8);

but it gives me \Collection::paginate does not exist."

Thanks!

Activity icon

Replied to Add URL Querystring As User Is Leaving Page

I got it working with push state after each ajax call! Thanks so much

Activity icon

Replied to Add URL Querystring As User Is Leaving Page

Oh Wow! I didn't even know this existed. So cool. So once the user clicks the method to navigate away I can do history.pushState(state, title, url). I will give it a shot. Thanks so much!

Activity icon

Started a new Conversation Add URL Querystring As User Is Leaving Page

Hi, Is there a way to append a querystring to the current url as the user exits the page? Here is my example. I am building a search function for my app. Instead of making the user reload the entire page, I just do axios calls and reload the data. So a user can filter the search looking for an event with a certain price range and certain category. I love doing this with axios calls because it is so fast and doesn't have to reload the page. The only problem I have found is that when someone clicks on one of the events and then presses the back arrow on the browser all of their filtering is gone. Is there a way to append the filter data to the url as the user leaves the page? This way if they press the back arrow it will show the filter data in the url and I can repopulate their custom search. Thanks!

Sep
16
1 month ago
Activity icon

Replied to Cant V-bind Paginated Data

@silencebringer That did the trick. Thanks so much! @neilstee I just kept them named the same as I pass the collection from laravel to vue. I'm not sure if that is bad practice or not.

Sep
15
1 month ago
Activity icon

Started a new Conversation Cant V-bind Paginated Data

Hi All, Has anyone else had an issue with V-binding paginated data? In my blade file I have

 <search-listing user="{{ auth()->id() }}" :tags="{{ $tags }}" :searchedevents="{{ $searchedevents }}" :onlineevents="{{ $onlineevents }}" :categories="{{ $categories }}" :searchedevents="{{ $searchedevents }}">

and when I try to load the file I get the error

The value for a v-bind expression cannot be empty. Found in "v-bind:searchedevents"

however if I just do a return in my controller

return $searchedevents =  Event::search('a')
            ->rule(EventMapSearchRule::class)
            ->with(['location', 'organizer'])
            ->paginate(8);

I get all the data. Also if I remove the pagination it also works.

Sep
14
1 month ago
Activity icon

Replied to Laravel Scout Match Up Anything In Array

Hmm I didn't see anything that helped there :(

Activity icon

Started a new Conversation Laravel Scout Match Up Anything In Array

Hi All, Sorry for the confusing title. I am using elastic search and Laravel scout to search in my project. For now when I search for categories I have a search rule with

$array = ['must' => []];
if (Request::get('category')) {
            $array['must'][] = [
                'match' => ['category_id' => Request::get('category')],
            ];
        }
return $array;

This works great for just one category but I am realizing that I want people to be able to see events that are in multiple categories. I can send through an array full of ids in my request category, but is there a way to say it must match one of the array like so

$array = ['must' => []];
if (Request::get('category')) {
            $array['must'][] = [
                'match' => ['category_id' => [12,4,34]],
            ];
        }
return $array;

I am getting the error

"error":{"root_cause":[{"type":"illegal_state_exception","reason":"Can't get text on a START_ARRAY at 1:94"}],"type":"illegal_state_exception","reason":"Can't get text on a START_ARRAY at 1:94"}

Thanks!

Sep
10
1 month ago
Activity icon

Replied to How To Deal With Commas In Json Schema

That did the trick and I learned some new tricks! Thanks so much @ismaile

Activity icon

Replied to How To Deal With Commas In Json Schema

Hmmm That doesn't seem to be working in my blade file. It doesn't give me an error but there is nothing showing up.

Activity icon

Replied to How To Deal With Commas In Json Schema

Oh right! I removed it and when I try doing

"sameAs": {{$organizer->getHandles()}},

I get htmlspecialchars() expects parameter 1 to be string, array given

Activity icon

Replied to How To Deal With Commas In Json Schema

Hi @ismaile I tried adding this to my model

 public function getHandles(){
        $result = [];
        if ($this->instagramHandle) {
            array_push($result, "https://www.instagram.com/{$this->instagramHandle}");
        }
        if ($this->facebookHandle) {
            array_push($result, "https://www.facebook.com/{$this->facebookHandle}");
        }
        if ($this->twitterHandle) {
            array_push($result, "https://www.twitter.com/{$this->twitterHandle}");
        }
        return $result;
    }

and then in my controller I added

$organizer->load('getHandles');
return view('organizers.show', compact('organizer'));

but I get the error

Call to a member function addEagerConstraints() on array
Activity icon

Replied to Best Way To Edit An Array Of Strings In Vue

Amazing! That did the trick. Thanks @ismaile

Activity icon

Replied to How To Deal With Commas In Json Schema

Hi @jlrdw Is this what you mean?

 "sameAs":[
            @if ($organizer->instagramHandle)
                "https://www.instagram.com/{{$organizer->instagramHandle}}",
            @else 
                "null",
            @endif
            @if ($organizer->facebookHandle)
                "https://www.facebook.com/{{$organizer->facebookHandle}}",
            @else
                "null",
            @endif
            @if ($organizer->twitterHandle)
            "https://www.twitter.com/{{$organizer->twitterHandle}}"
            @else
                "null"
            @endif
        ],

Does it matter to schema that I have something like this?

"sameAs":[
                            "https://www.instagram.com/thecelltheatre",
                                        "https://www.facebook.com/facebook.com/thecelltheatre",
                                        "null"
                    ],
Activity icon

Replied to Best Way To Edit An Array Of Strings In Vue

Hi @ismaile In my file I have

fixvalue() {
                var prices = this.searchedevents.map(event => event.price_range);
                console.log(prices);
                var fixed = prices.replace(/\d+(\.\d{1,2})?/g, dec => parseInt(dec));
                console.log(fixed);
            },

this returns

[".00", "Free", ".00"]

[Vue warn]: Error in v-on handler: "TypeError: prices.replace is not a function"

found in

---> <SearchListing> at resources/js/pages/events/event-search.vue
       <Root>
warn @ vendor.js?id=e0c498ee7d52a8d8ea00:15594
logError @ vendor.js?id=e0c498ee7d52a8d8ea00:16853
globalHandleError @ vendor.js?id=e0c498ee7d52a8d8ea00:16848
handleError @ vendor.js?id=e0c498ee7d52a8d8ea00:16808
invokeWithErrorHandling @ vendor.js?id=e0c498ee7d52a8d8ea00:16831
invoker @ vendor.js?id=e0c498ee7d52a8d8ea00:17148
original._wrapper @ vendor.js?id=e0c498ee7d52a8d8ea00:22507
vendor.js?id=e0c498ee7d52a8d8ea00:16857 TypeError: prices.replace is not a function
Activity icon

Started a new Conversation How To Deal With Commas In Json Schema

Hi, In my blade schema I have

"@type":"Organization",
        "description": "{{$organizer->description}}",
        "name": "{{$organizer->name}} {{ '- ' . \Illuminate\Support\Str::limit($organizer->description, 80)}}",
        "sameAs":[
            @if ($organizer->instagramHandle)
            "https://www.instagram.com/{{$organizer->instagramHandle}}",
            @endif
            @if ($organizer->facebookHandle)
            "https://www.facebook.com/{{$organizer->facebookHandle}}",
            @endif
            @if ($organizer->twitterHandle)
            "https://www.twitter.com/{{$organizer->twitterHandle}}"
            @endif
        ],

The I am having an issue with my sameAs section. I have a user submitted site so I am not sure if they will have an instagramHandle, FacebookHandle, or TwitterHandle. They could have only one of them, all three of them or none of them at all. The problem I am having is with the commas. If they just have a facebook handle it errors out because I end up with

"sameAs":[
            "https://www.facebook.com/placenamehere",
        ],

and the comma at the end breaks it. How do I make sure there are commas between them but the last one never has a comma?

Activity icon

Replied to Best Way To Edit An Array Of Strings In Vue

@automica Ha It emails me so I got to see it anyways :)

Activity icon

Replied to Best Way To Edit An Array Of Strings In Vue

Hi @siangboon I was looking for a way to do this in Vue. Sorry I should have mentioned that above.

Activity icon

Started a new Conversation Best Way To Edit An Array Of Strings In Vue

If I have an array of strings

[
    '$ 80.00 - $ 120.00', 
    '$ 32.30 - $ 44.30', 
    '$ 40.00 - $ 5.03'
]

what is the best way to remove anything after the decimal? It would be great to round up, but that isn't very important

[
    '$ 80 - $ 120', 
    '$ 33 - $ 45', 
    '$ 40 - $ 6'
]

Just a note, I had to put a space between the dollar sign and the numbers for it to show on here. In my actual file the dollar sign is touching the number

Sep
09
1 month ago
Activity icon

Replied to Linking To A Symlink

Ahh right @michaloravec , it needs the public folder inside the app folder.

Activity icon

Replied to Linking To A Symlink

So the pdf file is in /storage/app/letters/Southwick/ on the server?

Sep
01
1 month ago
Activity icon

Replied to Question About Laravel Auditing Plugin

@bobbybouwmann Gotcha, Ok I will look into figuring this out a different way. Thank you so much for trying!

Activity icon

Replied to Question About Laravel Auditing Plugin

Hi @bobbybouwmann So I tried

public function audit(Auditable $model)
    {
        if ($model instanceof Event && $model->status === 'p') {
            return;
        }

        // Do the regular implementation
        return parent::audit($model);
    }

and it gave me

exception: "Symfony\Component\ErrorHandler\Error\FatalError"
file: "/Users/chrisgrim/code/ei/app/AuditDrivers/MyCustomDriver.php"
line: 18
message: "Declaration of App\AuditDrivers\MyCustomDriver::audit(OwenIt\Auditing\Contracts\Auditable $model) must be compatible with OwenIt\Auditing\Contracts\AuditDriver::audit(OwenIt\Auditing\Contracts\Auditable $model): OwenIt\Auditing\Contracts\Audit"
trace: []
Aug
31
1 month ago
Activity icon

Replied to Question About Laravel Auditing Plugin

Hi @bobbybouwmann Thanks so much for taking the time to help me with this. I definitely need to create my own audit driver. I tried following the instructions. I created the MyCustomDriver.php in App/AuditDrivers and in that file I have

<?php
namespace App\AuditDrivers;

use OwenIt\Auditing\Contracts\Audit;
use OwenIt\Auditing\Contracts\Auditable;
use OwenIt\Auditing\Contracts\AuditDriver;
use App\Event;

class MyCustomDriver implements AuditDriver
{
    /**
     * Perform an audit.
     *
     * @param \OwenIt\Auditing\Contracts\Auditable $model
     *
     * @return \OwenIt\Auditing\Contracts\Audit
     */
    public function audit(Auditable $model): Audit
    {
        if ($model instanceof Event && $model->status === 'p') {
            return;
        }

        // Do the regular implementation
        return parent::audit($model);
    }

    /**
     * Remove older audits that go over the threshold.
     *
     * @param \OwenIt\Auditing\Contracts\Auditable $model
     *
     * @return bool
     */
    public function prune(Auditable $model): bool
    {
        // TODO: Implement the pruning logic
    }
}

and in my config folder for audit.php I changed


    // 'driver' => 'database',
    'driver' => App\AuditDrivers\MyCustomDriver::class,

    /*
    |--------------------------------------------------------------------------
    | Audit Driver Configurations
    |--------------------------------------------------------------------------
    |
    | Available audit drivers and respective configurations.
    |
    */

    'drivers' => [
        'database' => [
            'table'      => 'audits',
            'connection' => null,
        ],
    ],

but when I try to save some data I get

A function with return type must return a value",…}
exception: "Symfony\Component\ErrorHandler\Error\FatalError"
file: "/Users/chrisgrim/code/ei/app/AuditDrivers/MyCustomDriver.php"
line: 20
message: "A function with return type must return a value"
trace: []

This is a bit beyond me but I am trying my best to understand

Activity icon

Started a new Conversation Question About Laravel Auditing Plugin

Hi, I am using the Laravel Auditing app https://github.com/owen-it/laravel-auditing to track changes on my events. However, I was hoping to set it up so that it would only track changes if the event is published. In my model if the event.status == 'p' that means it's published. Right now it tracks every single event, even those that aren't published.

Activity icon

Replied to Value Not Updating On Load

LOL man my brain sometimes. Thanks @click

Activity icon

Started a new Conversation Value Not Updating On Load

Hi, I am trying to hide the favorite button inside my component. I am calling a component with

<vue-event-index :favorite="false" :loadurl="`/finish/events/${event.slug}`" :event="event"></vue-event-index>

And in my component I have

export default {
        props:['event', 'loadurl', 'color', 'favorite'],

        data() {
            return {
                showEventClass: 'heart',
                url: this.loadurl ? this.loadurl : '/events/' + this.event.slug,
                isDisabled: false,
                canFavorite: this.favorite ? this.favorite : true,
            }
        },

This returns canFavorite as true, even though in the vue chrome editor I can see that it has brought the favorite prop in as false. Am I doing something wrong?

Aug
28
2 months ago
Activity icon

Replied to Response Content Must Be A String Or Object Implementing __toString(), "boolean" Given.

After research I figured out the reason was

protected $primaryKey = "ID";

Activity icon

Replied to Response Content Must Be A String Or Object Implementing __toString(), "boolean" Given.

In my Posts model I have

    public $timestamps = false;
    protected $table = 'wpoy_posts';
    protected $guarded = ['id'];
Activity icon

Replied to Response Content Must Be A String Or Object Implementing __toString(), "boolean" Given.

Hi @sinnbeck I am a bit confused. When I do the code

$post = Posts::where( 'id', 12588)->first();
        return $new = preg_replace('#\[[^\]]+\]#', '',$post->post_content);

I get



Zola is quickly becoming one of the largest wedding registry websites. The simple registration, wide range of gorgeous (and useful) items, and top notch customer service have risen them to the top. It is no wonder that so many couples are using the Zola bridal registry for their wedding. Find out why you need to create an account in our Zola Wedding Registry Review. (And learn how to get  of free credit at the same time.)<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#Feel">Our Review</a></p><p class="mbn mtn" style="text-align: center;"><a class="hover" href="#guide">Pros/Cons</a></p><p class="mbn mtn" style="text-align: center;"><a class="hover" href="#Construction">Gifts</a></p><p class="mbn mtn" style="text-align: center;"><a class="hover" href="#cost">Cost/Discount</a></p><p class="mbn mtn" style="text-align: center;"><a class="hover" href="#summary">Conclusion</a></p><p class="mbn mtn" style="text-align: center;"><a class="hover" href="#Feel">Our Review</a></p>
<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#guide">Pros/Cons</a></p>
<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#Construction">Gifts</a></p>
<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#cost">Cost/Discount</a></p>
<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#summary">Conclusion</a></p><h2>Get The Best Goodies! Zola Wedding Registry Review</h2>
Wedding registries are nothing new. The concept of the registry for weddings has been around since 1924. A store called Marshall Field's created the idea so couples could choose items that family and friends then purchased. It is much nicer to get a gift from someone than money.

The concept has evolved and changed over the years to lead us to an online store like Zola. The wedding registry store goes above and beyond a plain department store. They do have appliances, but there is so much more.
<h3>My Experience With Zola</h3>
I first encountered Zola when I was looking for a wedding registry for my upcoming wedding. I'll admit that my fiance and I don't adhere to the typical marriage concepts. The last thing I wanted was my aunt to give me a toaster. (Even if it did toast the weather for the day)

In my desperation, I happened to come across Zola. The first thing that caught my eye was the experiences section of Zola. My family and friends could gift me a cheese of the month subscription or a wine tasting experience. I knew right then and there that I was going to use Zola for my wedding.

I won't go into details about setting up the account because I really don't need to. It was super easy, and I can't imagine anyone having any issues. My one piece of advice is to make sure and use our Zola discount to get  of free credit. It doesn't cost you anything more and it is silly to let  go to waste. If you do happen to have any questions, I found the Zola Customer support to be fast and responsive.<h2><strong>Pros & Cons</strong></h2><h3 style="text-align: left;" class=mts><span style="color: #339966;"><strong>Pros</strong></span></h3>Unique Experiences and EventsGreat deals for items and accessoriesHuge selection of wedding giftsZola price matches for all gifts of free credit with our discount links<h3 style="text-align: left;" class=mts><span style="color: #ff0000;"><strong>Cons</strong></span></h3>Zola only has experiences in major citiesAlmost too many things to look through<h3 class="mtn mbm"><strong>I recommend Zola too:</strong></h3><ul>
 	<li><strong>Couples who are looking for something different.</strong>
Zola has a ton of unique experiences and funds none of the other wedding registries have.</li>
 	<li><strong>Couples who want an easy registry.</strong>
Zola makes it super easy to sign up and create your registry.</li>
 	<li><strong>Couples who want  of free gift credit.</strong>
Use our discounts to get  of free Zola credit just for signing up for a registry.</li>
</ul><h2>The List of Zola wedding registry goodies is Massive.</h2>
It would take too long for me to write out each thing I like in my Zola Wedding Registry Review, but I will cover my favorite categories. I love experiences and events, so I focused most of my time on that. I did include a few cute items as I couldn't only show off one side of Zola.Choose your location and find out what experiences you and your partner can get. I love the hot air balloon ride in Santa Barbara.The best way to get money without someone actually giving you cash. I hope my friends get us drinks with a view.Zola has all the typical wedding registry gifts as well. Choose from bed sheets to speakers.My fiance is very excited about the gadgets and toys on the registry. I admit, there are a few toys I am eyeing myself.<h2>Zola bridal registry costs</h2>
Zola is one of the most reasonable registries I found online. They are all expensive, but Zola offers new customers  of extra credit when they sign up. I was sold and made sure to tell all of my girlfriends as well.
<h3>Zola registry Discount and deals.</h3>
Make sure to get  of free credit when you sign up for Zola. Any of the links on this page will give you the . Once you create a wedding registry, the money will appear in your account.<h2 class="mtm"><strong>Conclusion:</strong></h2><h1 style="text-align: center;"><span style="color: #3a912a;"><strong>9.4</strong></span></h1>
<p style="text-align: center;"><span style="color: #3a912a;">/10</span></p><h2>Zola Wedding Registry Review</h2>
Zola was the best wedding registry for me. I love the idea of a registry but hate the idea of getting a microwave or similar appliance. Zola wedding registry gave me all the options I could ever want. I look forward to seeing what experiences my friends and family have planned for my fiance and me.<h3 class="mts mbn">Get  of free credit with my Zola Discounts</h3>
Use the link to the right to get the discount Off

However when I do

$post = Posts::where( 'id', 12588)->first();
        $new = preg_replace('#\[[^\]]+\]#', '',$post->post_content);
        $post->update([
                'post_content' => $new
            ]);
        return Posts::where( 'id', 12588)->first();

It shows it as before without the shortcodes removed.

Activity icon

Started a new Conversation Response Content Must Be A String Or Object Implementing __toString(), "boolean" Given.

Hi, I am trying to use laravel to remove all the shortcodes from a wordpress database. However if I grab the field I can't save it back to the database without the must be string error. In my code I have

$post = Posts::where( 'id', 12588)->first();
        $new = $post->post_content;
        return $post->update([
                'post_content' => $new
            ]);

This is me literally just getting the post content and then retrying to save. If I return $new I get

[cs_content][cs_section parallax="false" separator_top_type="none" separator_top_height="50px" separator_top_angle_point="50" separator_bottom_type="none" separator_bottom_height="50px" separator_bottom_angle_point="50" class="finalwidth finalwidthmobile" style="margin: 0px;padding: 0px;"][cs_row inner_container="false" marginless_columns="true" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/3" class="hidesidebar x-hide-xs x-hide-sm" style="padding: 0px 2%;width: 250px;"][cs_text][homegoods]
[homegoodssidebar][/cs_text][/cs_column][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="2/3" style="padding: 0px;"][x_image type="none" src="https://www.topdownreviews.com/wp-content/uploads/2017/02/Zola-Wedding-Registry-Review.jpg" alt="Get Your Ultimate Wedding Registry Selection With Zola." link="false" href="" title="" target="" info="none" info_place="top" info_trigger="hover" info_content="" class="mbn"][cs_text]
Zola is quickly becoming one of the largest wedding registry websites. The simple registration, wide range of gorgeous (and useful) items, and top notch customer service have risen them to the top. It is no wonder that so many couples are using the Zola bridal registry for their wedding. Find out why you need to create an account in our Zola Wedding Registry Review. (And learn how to get  of free credit at the same time.)[/cs_text][/cs_column][/cs_row][/cs_section][cs_section parallax="false" separator_top_type="none" separator_top_height="50px" separator_top_angle_point="50" separator_bottom_type="none" separator_bottom_height="50px" separator_bottom_angle_point="50" class="finalwidth finalwidthmobile" style="margin: 0px;padding: 10px 0px 0px;"][cs_row inner_container="false" marginless_columns="true" bg_color="hsla(0, 0%, 100%, 0)" class="cs-hide-xs cs-hide-sm" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/5" style="padding: 1.5%;"][cs_text]<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#Feel">Our Review</a></p>[/cs_text][/cs_column][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/5" style="padding: 1.5%;"][cs_text]<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#guide">Pros/Cons</a></p>[/cs_text][/cs_column][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/5" style="padding: 1.5%;"][cs_text]<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#Construction">Gifts</a></p>[/cs_text][/cs_column][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/5" style="padding: 1.5%;"][cs_text]<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#cost">Cost/Discount</a></p>[/cs_text][/cs_column][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/5" style="padding: 1.5%;"][cs_text]<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#summary">Conclusion</a></p>[/cs_text][/cs_column][/cs_row][cs_row inner_container="false" marginless_columns="true" class="cs-hide-xl cs-hide-lg cs-hide-md" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px;"][x_accordion][x_accordion_item title="Jump to Specific Section" open="true"]<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#Feel">Our Review</a></p>
<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#guide">Pros/Cons</a></p>
<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#Construction">Gifts</a></p>
<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#cost">Cost/Discount</a></p>
<p class="mbn mtn" style="text-align: center;"><a class="hover" href="#summary">Conclusion</a></p>[/x_accordion_item][/x_accordion][/cs_column][/cs_row][/cs_section][cs_section parallax="false" separator_top_type="none" separator_top_height="50px" separator_top_angle_point="50" separator_bottom_type="none" separator_bottom_height="50px" separator_bottom_angle_point="50" class="finalwidth finalwidthmobile" style="margin: 0% 0px 0px;padding: 0% 0px;border-style: solid;border-width: 0px;"][cs_row inner_container="false" marginless_columns="true" bg_color="hsla(0, 11%, 95%, 0)" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px;"][cs_text id="Feel"]<h2>Get The Best Goodies! Zola Wedding Registry Review</h2>
Wedding registries are nothing new. The concept of the registry for weddings has been around since 1924. A store called Marshall Field's created the idea so couples could choose items that family and friends then purchased. It is much nicer to get a gift from someone than money.

The concept has evolved and changed over the years to lead us to an online store like Zola. The wedding registry store goes above and beyond a plain department store. They do have appliances, but there is so much more.
<h3>My Experience With Zola</h3>
I first encountered Zola when I was looking for a wedding registry for my upcoming wedding. I'll admit that my fiance and I don't adhere to the typical marriage concepts. The last thing I wanted was my aunt to give me a toaster. (Even if it did toast the weather for the day)

In my desperation, I happened to come across Zola. The first thing that caught my eye was the experiences section of Zola. My family and friends could gift me a cheese of the month subscription or a wine tasting experience. I knew right then and there that I was going to use Zola for my wedding.

I won't go into details about setting up the account because I really don't need to. It was super easy, and I can't imagine anyone having any issues. My one piece of advice is to make sure and use our Zola discount to get  of free credit. It doesn't cost you anything more and it is silly to let  go to waste. If you do happen to have any questions, I found the Zola Customer support to be fast and responsive.[/cs_text][/cs_column][/cs_row][cs_row inner_container="false" marginless_columns="true" class="high classaddmiddle" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" class="cs-ta-left" style="padding: 0px;"][cs_text][homegoodsmiddle][/cs_text][/cs_column][/cs_row][/cs_section][cs_section parallax="false" separator_top_type="none" separator_top_height="50px" separator_top_angle_point="50" separator_bottom_type="none" separator_bottom_height="50px" separator_bottom_angle_point="50" class="finalwidth finalwidthmobile" style="margin: 0px;padding: 0px;border-style: solid;border-width: 1px 0px 0px;"][cs_row inner_container="false" marginless_columns="true" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px;"][cs_text id="guide"]<h2><strong>Pros & Cons</strong></h2>[/cs_text][/cs_column][/cs_row][cs_row inner_container="false" marginless_columns="true" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/2" style="padding: 0px;"][cs_text]<h3 style="text-align: left;" class=mts><span style="color: #339966;"><strong>Pros</strong></span></h3>[/cs_text][cs_icon_list][cs_icon_list_item title="Unique Experiences and Events" type="check" link_enabled="false" link_url="#" link_new_tab="false"]Unique Experiences and Events[/cs_icon_list_item][cs_icon_list_item title="Great deals for items and accessories" type="check" link_enabled="false" link_url="#" link_new_tab="false"]Great deals for items and accessories[/cs_icon_list_item][cs_icon_list_item title="Huge selection of wedding gifts" type="check" link_enabled="false" link_url="#" link_new_tab="false"]Huge selection of wedding gifts[/cs_icon_list_item][cs_icon_list_item title="Zola price matches for all gifts" type="check" link_enabled="false" link_url="#" link_new_tab="false"]Zola price matches for all gifts[/cs_icon_list_item][cs_icon_list_item title=" of free credit with our discount links" type="check" link_enabled="true" link_url="/out/zola/" link_new_tab="false"] of free credit with our discount links[/cs_icon_list_item][/cs_icon_list][/cs_column][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/2" style="padding: 0px;"][cs_text class="mtn"]<h3 style="text-align: left;" class=mts><span style="color: #ff0000;"><strong>Cons</strong></span></h3>[/cs_text][cs_icon_list][cs_icon_list_item title="Zola only has experiences in major cities" type="times" link_enabled="false" link_url="#" link_new_tab="false"]Zola only has experiences in major cities[/cs_icon_list_item][cs_icon_list_item title="Almost too many things to look through" type="times" link_enabled="false" link_url="#" link_new_tab="false"]Almost too many things to look through[/cs_icon_list_item][/cs_icon_list][/cs_column][/cs_row][cs_row inner_container="false" marginless_columns="true" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px 0px 0%;"][cs_text id="coupon"]<h3 class="mtn mbm"><strong>I recommend Zola too:</strong></h3>[/cs_text][cs_text]<ul>
 	<li><strong>Couples who are looking for something different.</strong>
Zola has a ton of unique experiences and funds none of the other wedding registries have.</li>
 	<li><strong>Couples who want an easy registry.</strong>
Zola makes it super easy to sign up and create your registry.</li>
 	<li><strong>Couples who want  of free gift credit.</strong>
Use our discounts to get  of free Zola credit just for signing up for a registry.</li>
</ul>[/cs_text][/cs_column][/cs_row][cs_row inner_container="false" marginless_columns="true" class="cs-ta-center" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" class="cs-ta-center" style="padding: 0px;"][x_image type="none" src="https://www.topdownreviews.com/wp-content/uploads/2017/02/Zola-coupon-codes.jpg" alt="Zola wedding registry coupon codes" link="true" href="/out/zola/" title="" target="" info="none" info_place="top" info_trigger="hover" info_content="" class="mbn"][/cs_column][/cs_row][/cs_section][cs_section parallax="false" separator_top_type="none" separator_top_height="50px" separator_top_angle_point="50" separator_bottom_type="none" separator_bottom_height="50px" separator_bottom_angle_point="50" class="finalwidth finalwidthmobile" style="margin: 0px;padding: 0px 0px 4%;border-style: solid;border-width: 1px 0px;"][cs_row inner_container="false" marginless_columns="true" bg_color="hsla(0, 0%, 100%, 0)" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0% 0px;"][cs_text id="Construction"]<h2>The List of Zola wedding registry goodies is Massive.</h2>
It would take too long for me to write out each thing I like in my Zola Wedding Registry Review, but I will cover my favorite categories. I love experiences and events, so I focused most of my time on that. I did include a few cute items as I couldn't only show off one side of Zola.[/cs_text][x_feature_list animation_offset="50" animation_delay_initial="0" animation_delay_between="300"][x_feature_box title="Experiences" title_color="" text_color="" graphic="numbers" graphic_size="30px" graphic_shape="circle" graphic_color="#ffffff" graphic_bg_color="hsl(194, 63%, 49%)" align_h="left" align_v="top" side_graphic_spacing="20px" max_width="none" child="true" connector_width="1px" connector_style="dashed" connector_color="#272727" graphic_animation="zoomIn"]Choose your location and find out what experiences you and your partner can get. I love the hot air balloon ride in Santa Barbara.[/x_feature_box][x_feature_box title="Funds" title_color="" text_color="" graphic="numbers" graphic_size="30px" graphic_shape="circle" graphic_color="#ffffff" graphic_bg_color="hsl(194, 63%, 49%)" align_h="left" align_v="top" side_graphic_spacing="20px" max_width="none" child="true" connector_width="1px" connector_style="dashed" connector_color="#272727" graphic_animation="zoomIn"]The best way to get money without someone actually giving you cash. I hope my friends get us drinks with a view.[/x_feature_box][x_feature_box title="Bed and Bath" title_color="" text_color="" graphic="numbers" graphic_size="30px" graphic_shape="circle" graphic_color="#ffffff" graphic_bg_color="hsl(194, 63%, 49%)" align_h="left" align_v="top" side_graphic_spacing="20px" max_width="none" child="true" connector_width="1px" connector_style="dashed" connector_color="#272727" graphic_animation="zoomIn"]Zola has all the typical wedding registry gifts as well. Choose from bed sheets to speakers.[/x_feature_box][x_feature_box title="Electronics" title_color="" text_color="" graphic="numbers" graphic_size="30px" graphic_shape="circle" graphic_color="#ffffff" graphic_bg_color="hsl(194, 63%, 49%)" align_h="left" align_v="top" side_graphic_spacing="20px" max_width="none" child="true" connector_width="1px" connector_style="dashed" connector_color="#272727" graphic_animation="zoomIn"]My fiance is very excited about the gadgets and toys on the registry. I admit, there are a few toys I am eyeing myself.[/x_feature_box][/x_feature_list][/cs_column][/cs_row][/cs_section][cs_section parallax="false" separator_top_type="none" separator_top_height="50px" separator_top_angle_point="50" separator_bottom_type="none" separator_bottom_height="50px" separator_bottom_angle_point="50" class="finalwidth finalwidthmobile" style="margin: 0px;padding: 0px 0px 1%;border-style: solid;border-width: 0px;"][cs_row inner_container="false" marginless_columns="true" bg_color="hsla(0, 0%, 100%, 0)" style="margin: 0px auto;padding: 2% 0px 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px;"][cs_text id="cost"]<h2>Zola bridal registry costs</h2>
Zola is one of the most reasonable registries I found online. They are all expensive, but Zola offers new customers  of extra credit when they sign up. I was sold and made sure to tell all of my girlfriends as well.
<h3>Zola registry Discount and deals.</h3>
Make sure to get  of free credit when you sign up for Zola. Any of the links on this page will give you the . Once you create a wedding registry, the money will appear in your account.[/cs_text][/cs_column][/cs_row][/cs_section][cs_section bg_color="hsl(194, 8%, 96%)" parallax="false" separator_top_type="none" separator_top_height="50px" separator_top_angle_point="50" separator_bottom_type="none" separator_bottom_height="50px" separator_bottom_angle_point="50" class="finalwidth finalwidthmobile" style="margin: 0px;padding: 0px 0px 0%;"][cs_row inner_container="false" marginless_columns="true" bg_color="hsla(0, 0%, 100%, 0)" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px;"][x_gap size="5px"][/cs_column][/cs_row][cs_row inner_container="false" marginless_columns="true" bg_color="hsla(0, 0%, 100%, 0)" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px;border-style: solid;border-width: 1px 0px 0px;"][cs_text id="summary"]<h2 class="mtm"><strong>Conclusion:</strong></h2>[/cs_text][/cs_column][/cs_row][cs_row inner_container="false" marginless_columns="true" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/5" class="cs-ta-center" style="padding: 0px;"][x_gap size="40px"][cs_text]<h1 style="text-align: center;"><span style="color: #3a912a;"><strong>9.4</strong></span></h1>
<p style="text-align: center;"><span style="color: #3a912a;">/10</span></p>[/cs_text][/cs_column][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="4/5" style="padding: 0px;"][cs_text]<h2>Zola Wedding Registry Review</h2>
Zola was the best wedding registry for me. I love the idea of a registry but hate the idea of getting a microwave or similar appliance. Zola wedding registry gave me all the options I could ever want. I look forward to seeing what experiences my friends and family have planned for my fiance and me.[/cs_text][/cs_column][/cs_row][/cs_section][cs_section bg_color="hsl(0, 0%, 95%)" parallax="false" separator_top_type="none" separator_top_height="50px" separator_top_angle_point="50" separator_bottom_type="none" separator_bottom_height="50px" separator_bottom_angle_point="50" class="finalwidth finalwidthmobile" style="margin: 0px;padding: 20px 0px 7px;border-style: solid;border-width: 1px;border-color: hsl(0, 0%, 87%);"][cs_row inner_container="false" marginless_columns="true" bg_color="hsla(199, 60%, 50%, 0)" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="2/3" style="padding: 0px;"][cs_text class="cs-ta-left"]<h3 class="mts mbn">Get  of free credit with my Zola Discounts</h3>
Use the link to the right to get the discount[/cs_text][/cs_column][cs_column bg_color="hsla(0, 0%, 100%, 0)" fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/3" style="padding: 0px;border-style: solid;border-width: 2px;border-color: hsla(0, 100%, 20%, 0);"][x_button size="global" block="true" circle="false" icon_only="false" href="/out/zola/" title="" target="blank" info="tooltip" info_place="top" info_trigger="hover" info_content="Get  off" class="button-white"] Off[/x_button][/cs_column][/cs_row][/cs_section][cs_section parallax="false" separator_top_type="none" separator_top_height="50px" separator_top_angle_point="50" separator_bottom_type="none" separator_bottom_height="50px" separator_bottom_angle_point="50" class="high classaddbottom" style="margin: 0px;padding: 0px;"][cs_row inner_container="false" marginless_columns="true" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px;"][cs_text][homegoodsbottom][/cs_text][/cs_column][/cs_row][/cs_section][/cs_content]
Aug
25
2 months ago
Activity icon

Replied to Searching If Date Range Is Within Date Range Issue

Omg I finally understood what @bobbybouwmann was saying. I am such an idiot. Thank you both!!

Activity icon

Replied to Searching If Date Range Is Within Date Range Issue

Hi @michaloravec So I tried

$thursday = Carbon::now()->startOfWeek()->addDays(3)->toDateString(); 
        $wednesday = Carbon::now()->startOfWeek()->addDays(9)->toDateString(); 
        $staffpick = StaffPick::where(function($query) use ($thursday, $wednesday){
                $query->whereDate('start_date', '<=', $thursday)
                        ->whereDate('end_date', '>=', $wednesday);
            })
            ->orderBy('rank')
            ->first();
        return $staffpick;

and it returns nothing. If I do

$staffpick = StaffPick::orderBy('rank')
            ->first();
        return $staffpick;

it returns

id": 1,
"event_id": 215,
"user_id": 1,
"rank": 5,
"start_date": "2020-08-25 00:00:00",
"end_date": "2020-08-26 00:00:00",
"created_at": "2020-08-25T19:55:39.000000Z",
"updated_at": "2020-08-25T20:11:17.000000Z",
"comments": "xsxzsxzsxzsxzsx",

So at least the model is there.

Activity icon

Replied to Searching If Date Range Is Within Date Range Issue

Hi @bobbybouwmann

I am doing a staff picks where I let the staff pick events to feature from the start_date to the end_date. So I want to check to see if the date range they selected overlaps with Thur of this week -> Wed of next week. I tried doing

return $staffpick = StaffPick::where(function($query) use ($thursday, $wednesday){
                $query->whereDate('start_date', '>=', $thursday)
                       ->whereDate('end_date', '<=', $wednesday);
            })
            ->orderBy('rank')
            ->first();

and it still returns nothing.

Activity icon

Started a new Conversation Searching If Date Range Is Within Date Range Issue

Hi, I am tyring to figure out what I am doing wrong with my code. I have

        $thursday = Carbon::now()->startOfWeek()->addDays(3); 
        $wednesday = Carbon::now()->startOfWeek()->addDays(9); 
        $staffpick = StaffPick::where(function($query) use ($thursday, $wednesday){
                $query->whereDate('start_date', '<=', $thursday)
                       ->whereDate('end_date', '>=', $wednesday);
            })
            ->orderBy('rank')
            ->first();
return $staffpick;

but this returns nothing even though I know I have a model with the dates start_date = 2020-08-27 00:00:00 and end_date = 2020-09-02 00:00:00

Aug
21
2 months ago
Activity icon

Replied to Logging Issue With Submission

Thank you!

Activity icon

Started a new Conversation Logging Issue With Submission

Hi, I am tracking users who submit to my app using

Log::info('User is submitting an event');

in my controller. However because of permissions in my server it for a bit of time it wasn't able to write to my log file. This was causing it to error out and not let the users actually submit an event. Is there a way to say if this thing errors ignore it and keep going through the controller logic?

Aug
20
2 months ago
Activity icon

Replied to How To Load Content In Vue After Everything Has Loaded?

Ok I tried adding it to my main component and it shows the alert before anything on my page loads.

<template>
    <div class="event-index-container">
        <div class="event-index">
            <header class="padded">
                <div class="header-title">
                    <h3>Discover immersive experiences...</h3>
                </div>
                <div class="index-nav-search">
                    <nav-search></nav-search>
                </div>
            </header>

            <section id="latestevents" class="padded staffpicks__banner" v-if="staffpicks">
                <div class="banner-title__staffpicks">
                    <h3>This Week's Staff Picks</h3>
                </div>
                <div class="staffpicks__selection">
                    <a :href="`/events/${staffpicks.event.slug}`">
                        <div class="staffpicks__selection--main">
                            <div class="staffpicks__image">
                                <picture>
                                    <source type="image/webp" :srcset="`/storage/${staffpicks.event.thumbImagePath}`"> 
                                    <img :src="`/storage/${staffpicks.event.thumbImagePath.slice(0, -4)}jpg`" :alt="`${staffpicks.event.name} Immersive Event`">
                                </picture>
                            </div>
                            <div>
                                <div class="staffpicks__title">
                                    <h4>{{staffpicks.event.name}}</h4>
                                    <p>{{staffpicks.event.organizer.name}}</p>
                                </div>
                                <div class="staffpicks__user">
                                    <picture>
                                        <source type="image/webp" :srcset="`/storage/${staffpicks.user.thumbImagePath}`"> 
                                        <img :src="`/storage/${staffpicks.user.thumbImagePath.slice(0, -4)}jpg`" :alt="`${staffpicks.user.name} Immersive Event`">
                                    </picture>
                                    <div class="staffpicks__user--name">
                                        <p>{{staffpicks.user.name}}</p>
                                    </div>
                                </div>
                                <div class="staffpicks__summary">
                                    <p>" {{staffpicks.comments}} "</p>
                                </div>
                            </div>
                        </div>
                    </a>
                    <a href="/staffpicks/current">
                        <div class="staffpicks__selection--loadmore">
                            <h3>Check out the rest of the picks here.</h3>
                        </div>
                    </a>
                </div>
            </section>
            
            <section id="latestevents" class="padded event-list">
                <div class="header-title">
                    <h3>Latest events</h3>
                </div>   
                <div class="event-index-eventlist grid">
                    <div v-for="(event, index) in eventList" class="eventlist__element">
                        <vue-event-index :event="event"></vue-event-index>
                    </div>
                </div>
                <div class="see-more-events">
                    <a href="/index/search-online">
                        <button class="default"> See More Events</button>
                    </a>
                </div>
            </section>

            <section class="announcement padded">
                <div class="header-title__announcement">
                    <h3>Read The 2020 Immersive Entertainment Industry Annual Report</h3>
                    <p>Discover The Strength of Immersive Entertainment!</p>
                    <br>
                    <p><a href="/storage/website-files/documents/2020 Immersive Entertainment Industry Annual Report.pdf"><button class="black">Check out the report here</button></a></p>
                </div>
            </section>

            <section>
                <div class="index-contributers">
                    <h3>Check out our partners</h3>
                    <div class="contributer-content grid">
                        <div class="contributer__element" >
                            <a target="_blank" rel="noopener noreferrer" href="https://www.argn.com/">
                                <button style="background: url('/storage/website-files/argn-logo.jpg') center center / cover no-repeat;" class="contributer--button"></button>
                            </a>
                        </div>
                        <div class="contributer__element" >
                            <a target="_blank" rel="noopener noreferrer" href="https://roomescapeartist.com/">
                                <button style="background: url('/storage/website-files/rea-logo.png') center center / cover no-repeat;" class="contributer--button"></button>
                            </a>
                        </div>
                        <div class="contributer__element" >
                             <a target="_blank" rel="noopener noreferrer" href="https://noproscenium.com/">
                                <button style="background: url('/storage/website-files/nopro-logo.jpg') center center / cover no-repeat;" class="contributer--button"></button>
                            </a>
                        </div>
                        <div class="contributer__element" >
                             <a target="_blank" rel="noopener noreferrer" href="https://www.herefest.com/">
                                <button style="background: url('/storage/website-files/here-logo.png') center center / cover no-repeat;" class="contributer--button"></button>
                            </a>
                        </div>
                    </div>
                </div>
            </section>
            
            


        </div>
    </div>
</template>

<script>
    import _ from 'lodash';
    import Multiselect from 'vue-multiselect';
    import format from 'date-fns/format';
    import catitem  from '../events/components/cat-item.vue';
    import SearchFilter  from './components/filter-remote.vue'
    import LoadMore  from '../../components/LoadMore.js'


    export default {

        components: { Multiselect, catitem, SearchFilter, LoadMore },

        props:['events', 'categories', 'staffpicks'],

        computed: {
            user () {
                return this.$store.state.user ? this.$store.state.user : ''
            }
        },

        data() {
            return {
                eventList: this.events ? this.events : [],
                value: '',
                list: [],
                price: '',
                eventName: '',
                location: [],

            }
        },

        methods: {

            

        },

        mounted: function () {
            this.$nextTick(function () {
                alert('test');
            })
        }

    };
</script>
Activity icon

Replied to How To Load Content In Vue After Everything Has Loaded?

Here is my full vue template. I realized that this component loaded inside another vue component vue-main-page has vue-nav-search inside of it.

<template>
    <div class="nav-search__content">
        <div class="icon">
            <svg aria-hidden="true" role="presentation" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" style="display: block; fill: none; height: 16px; width: 16px; stroke: currentcolor; stroke-width: 4; overflow: visible;"><g fill="none"><path d="m13 24c6.0751322 0 11-4.9248678 11-11 0-6.07513225-4.9248678-11-11-11-6.07513225 0-11 4.92486775-11 11 0 6.0751322 4.92486775 11 11 11zm8-3 9 9"></path></g></svg>
        </div>
        <multiselect 
        v-model="searchBoxInput" 
        :options="searchBoxOptions" 
        open-direction="bottom"
        :placeholder="placeholder"
        label="name"
        :loading="isLoading"
        :show-labels="false"
        :internal-search="false"
        :options-limit="30" 
        :limit="5"  
        track-by="name"
        @open="generateSearchList"
        @search-change="generateSearchList"
        @input="searchInput"
        :show-no-results="false"
        :allow-empty="false">
            <template slot="singleLabel" slot-scope="props">
                <span class="option__desc">
                <span class="option__title">
                    {{ props.option.name }}</span>
                </span>
            </template>
             <template slot="option" slot-scope="props">
                <div class="option__desc">
                    <div class="option__title" style="padding-bottom:1rem;height:2.4rem;">
                        <div style="display:inline-block;float: left;">
                            <svg v-if="props.option.type == 'c' || props.option.type == 'r' || props.option.type == 't'" viewBox="0 0 24 24" fill="currentColor" fill-opacity="0" stroke="currentColor" stroke-width="1.5" focusable="false" aria-hidden="true" role="presentation" stroke-linecap="round" stroke-linejoin="round" style="height: 24px; width: 24px; display: inline-block; overflow: visible;">
                                <path d="M7.6,19.4h8.9c2.2,0,4-1.8,4-4V6.5c0-2.2-1.8-4-4-4H7.6c-2.2,0-4,1.8-4,4v8.9C3.6,17.7,5.4,19.4,7.6,19.4z"/>
                                <path d="M20.5,7.5"/>
                                <line x1="16.3" y1="11" x2="6.8" y2="11"/>
                                <line x1="16.4" y1="11.2" x2="11.2" y2="7.5"/>
                                <line x1="16.4" y1="10.7" x2="11.3" y2="14.5"/>
                            </svg>
                            <svg v-if="props.option.type == 'o'" viewBox="0 0 24 24" fill="currentColor" fill-opacity="0" stroke="currentColor" stroke-width="1.5" focusable="false" aria-hidden="true" role="presentation" stroke-linecap="round" stroke-linejoin="round" style="height: 24px; width: 24px; display: inline-block; overflow: visible;">
                                <path d="M20.5,11c0-5-4.3-9-9.5-8.4C7.3,3,4.2,6,3.7,9.8c-0.4,2.9,0.7,5.5,2.6,7.3c0.1,0.1,0.3,0,0.2-0.1 c-0.2-0.9-0.2-1.9,0.1-3c0.6-2,2.4-3.6,4.4-3.9c3.7-0.7,6.9,2.1,6.9,5.7c0,0.5-0.6,1.3-0.2,1.4C19.5,15.7,20.5,13.4,20.5,11z"/>
                                <path class="st0" d="M12.2,10c-3.2,0-5.8,2.6-5.8,5.8c0,0.6,0.1,1.1,0.2,1.7c1.5,1.2,3.4,2,5.5,2c2.2,0,4.2-0.9,5.7-2.2 c0.1-0.5,0.2-0.9,0.2-1.4C18,12.6,15.4,10,12.2,10z"/>
                                <path class="st0" d="M20.5,7.5"/>
                                <circle class="st0" cx="12.1" cy="7.2" r="2.4"/>
                            </svg>
                            <svg v-if="props.option.call_to_action" viewBox="0 0 24 24" fill="currentColor" fill-opacity="0" stroke="currentColor" stroke-width="1.5" focusable="false" aria-hidden="true" role="presentation" stroke-linecap="round" stroke-linejoin="round" style="height: 24px; width: 24px; display: inline-block; overflow: visible;">
                               <path d="M8.6,19.4h6.9c2.8,0,5-2.2,5-5V7.5c0-2.8-2.2-5-5-5H8.6c-2.8,0-5,2.2-5,5v6.9C3.6,17.2,5.8,19.4,8.6,19.4z"/>
                                <line x1="3.6" y1="7.5" x2="20.5" y2="7.5"/>
                                <line x1="8.6" y1="2.5" x2="8.6" y2="1.2"/>
                                <line x1="15.3" y1="2.5" x2="15.3" y2="1.2"/>
                            </svg>
                            <svg v-if="props.option.latitude" viewBox="0 0 24 24" fill="currentColor" fill-opacity="0" stroke="currentColor" stroke-width="1.5" focusable="false" aria-hidden="true" role="presentation" stroke-linecap="round" stroke-linejoin="round" style="height: 24px; width: 24px; display: inline-block; overflow: visible;"><path d="M12.2,2.2c-3.9,0-7.1,3.2-7.1,7.1c0,5.7,6.4,10.9,6.4,10.9c0.4,0.3,1,0.3,1.4,0c0,0,6.4-5.2,6.4-10.9
                            C19.2,5.4,16.1,2.2,12.2,2.2z M12.1,11.6c-1.5,0-2.7-1.2-2.7-2.7s1.2-2.7,2.7-2.7s2.7,1.2,2.7,2.7S13.6,11.6,12.1,11.6z"/></svg>
                        </div>
                        <div style="display:inline-block;float: left;margin-top:.5rem;padding-left:1rem;width: 90%;white-space: nowrap;">
                            {{ props.option.name }}
                        </div>
                    </div>
                </div>
            </template>
        </multiselect>      
    </div>
</template>

<script>
import Multiselect from 'vue-multiselect'
import _ from 'lodash'


export default {

    components: { Multiselect },

    computed: {
    },


    data() {
        return {
            searchBoxInput: [],
            searchBoxOptions: [
                {name: 'Loading List...'}
            ],
            isLoading: false,
            search: this.initializeSearchObject(),
            placeholder: new URL(window.location.href).searchParams.get("name") ? new URL(window.location.href).searchParams.get("name") : window.innerWidth < 768 ? 'Search' : 'Search by event name, category, location, or tag',
            type: '',
        }
    },

    methods: {

        generateSearchList (query) {
            axios.get('/api/search/navbar/content', { params: { keywords: query } })
            .then(res => {
                console.log(res.data);
                this.searchBoxOptions = res.data.data;
            });
        },

        initializeSearchObject() {
            return {
                name: '',
                latitude: '',
                longitude: '',
            }
        },

        searchInput() {
            this.searchBoxInput.type == 'c' ? window.location.href = `/index/search-online?category=${this.searchBoxInput.name}&id=${this.searchBoxInput.id}` : '';
            this.searchBoxInput.type == 'r' ? window.location.href = `/index/search-online?remote=${this.searchBoxInput.name}&id=${this.searchBoxInput.id}` : '';
            this.searchBoxInput.type == 't' ? window.location.href = `/index/search-online?tag=${this.searchBoxInput.name}&id=${this.searchBoxInput.id}` : '';
            this.searchBoxInput.type == 'o' ? window.location.href = `/organizer/${this.searchBoxInput.slug}` : '';
            this.searchBoxInput.call_to_action ? window.location.href = `/events/${this.searchBoxInput.slug}` : '';
            this.searchBoxInput.latitude ? this.globalSearch() : '';

        },

        globalSearch() {
            window.location.href = `/index/search?name=${this.searchBoxInput.name}&lat=${this.searchBoxInput.latitude}&lng=${this.searchBoxInput.longitude}`;
        },

    },

    mounted: function () {
        this.$nextTick(function () {
            alert('test');
        })
    }

};
</script>