TrentDPT

Experience

30,465

0 Best Reply Awards

  • Member Since 2 Years Ago
  • 277 Lessons Completed
  • 0 Favorites

16th January, 2018

TrentDPT left a reply on Laravel Forum - Searchable Vids - 2nd Search • 1 month ago

So i'm finding that this is purely a TDD problem. When I just build it as the videos everything works in the browser. Weird

TrentDPT left a reply on Laravel Forum - Searchable Vids - 2nd Search • 1 month ago

One issue that keeps happening with this also, is the second that I add a new test in SearchTest that is for a different item, the first test starts to Fail stating

failed asserting that actual size 0 matches expected size 2;

but then when I re-import the initial Class with scout and run the test again, then it doesnt fail.

Thoughts?

TrentDPT started a new conversation Laravel Forum - Searchable Vids - 2nd Search • 1 month ago

Hi everyone,

I went through the series for First Class Search, in the TDD Forum course. The issue I'm running into is that my site has multiple pages that have different items to search. For this we can just say 2 different pages, with 2 different lists to search.

When I start to go back through the process with the second page, everything starts to blow-up. Is there anything different when you add a second page?

9th January, 2018

TrentDPT started a new conversation Jenssegers/Agent For Mobile? • 1 month ago

Hi everyone,

Curious what everyone else uses for Desktop vs Mobile devices when they want to include/exclude content. Like a @if / @else scenario, but with different devise sizes. What are the current solutions you are all using?

8th January, 2018

TrentDPT started a new conversation Vue-instantsearch / Forum Ep 98 • 1 month ago

Hi everyone,

In episode 98 of the Forum, Jeffrey uses Vue-instantsearch, and manipulates the Search bar via slots.

Im not sure i followed this well, and im trying to manipulate the RefinementLists, and have no idea about how to go about it. Any helpfuk advice?

30th December, 2017

TrentDPT left a reply on Homestead - Count(): Parameter Must Be An Array.... • 1 month ago

@shez1983

Thanks for the heads up. Found this on stackoverflow

https://stackoverflow.com/questions/47849825/downgrade-laravel-homestead-v7-0-1-with-php-7-2-to-php-7-1

just typing in php71 into the command line changed the cli version for me temporarily

TrentDPT left a reply on Homestead - Count(): Parameter Must Be An Array.... • 1 month ago

I added the above, and it works in the browser, but I still get this

[email protected]:~/brooksihl$ php -v
PHP 7.2.0-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Nov 30 2017 13:58:33) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies

and this is the error

1) Tests\Feature\ReadPtCaseTest::test_a_user_can_browse_cases
ErrorException: count(): Parameter must be an array or an object that implements Countable

/home/vagrant/brooksihl/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:932
/home/vagrant/brooksihl/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:1243
/home/vagrant/brooksihl/app/Http/Controllers/PtCaseController.php:142
/home/vagrant/brooksihl/app/Http/Controllers/PtCaseController.php:27
/home/vagrant/brooksihl/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:55
/home/vagrant/brooksihl/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:44
/home/vagrant/brooksihl/vendor/laravel/framework/src/Illuminate/Routing/Route.php:203
/home/vagrant/brooksihl/vendor/laravel/framework/src/Illuminate/Routing/Route.php:160
/home/vagrant/brooksihl/vendor/laravel/framework/src/Illuminate/Routing/Router.php:574
/home/vagrant/brooksihl/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
/home/vagrant/brooksihl/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41

TrentDPT left a reply on Homestead - Count(): Parameter Must Be An Array.... • 1 month ago

@ejdelmonico , @shez1983

So i added

sites:
    -
        map: brooksihl.dev
        to: /home/vagrant/brooksihl/public
        php: "7.1"

and then i ran vagrant destroy, followed by vagrant up. When I go back in the website itself has no issues with count(), but when i run vendor/bin/phpunit there is still the count() error. Does this have to do with this...

"require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~5.7"

?

TrentDPT left a reply on Homestead - Count(): Parameter Must Be An Array.... • 1 month ago

@ejdelmonico, any thoughts on this buddy?

29th December, 2017

TrentDPT left a reply on Homestead - Count(): Parameter Must Be An Array.... • 1 month ago

@shez1983 If i've already taken the steps as above, do I just add that line you listed? or do I need to "rerun" or do something else to implement it?

TrentDPT left a reply on Homestead - Count(): Parameter Must Be An Array.... • 1 month ago

@junlue, I have another quick question for you. What you told me to do worked perfectly, but not when I run phpunit tests I get the same error in my test environments....

ErrorException: Count(): Parameter must be an array or an object that implements Countable

There has to be something simple that I'm just missing here...thoughts?

21st December, 2017

TrentDPT left a reply on Homestead - Count(): Parameter Must Be An Array.... • 2 months ago

Well thats a bummer. No solutions in the works currently? I take it this is a fairly new issue?

Ok, ill try and walk it back then. Appreciate it. Ill let you know how it goes

TrentDPT started a new conversation Redis / Windows / Publish • 2 months ago

Morning all,

What advice do you have for setting up Redis with Windows 10 & Xampp? Or is it best to try and get it going with Homebrew and thats it?

Also, once I'm done with the series Forum with TDD & they use Redis often...how do I go about ensuring that the site I publish to is utilizing Redis?

13th December, 2017

TrentDPT started a new conversation Homestead - Count(): Parameter Must Be An Array.... • 2 months ago

Hey everyone,

I seem to have no issue when i run a server through xampp & use myphpadmin, but then when i switched the project over to homestead & used $faker to create the entire DB i get a count() error.

Wheb i use php tinker im able to see that all the proper data is input, but i still get this odd error. Its the equivalent setup to the Forums TDD series, and the threads. Where he uses the scope & builder.

(1/1) ErrorException
count(): Parameter must be an array or an object that implements Countable
in Builder.php (line 932)
at HandleExceptions->handleError(2, 'count(): Parameter must be an array or an object that implements Countable', '/home/vagrant/brooksihl/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php', 932, array('scope' => array(object(Reference), 'scopeForRegion'), 'parameters' => array(object(Builder), object(Region)), 'query' => object(Builder), 'originalWhereCount' => 0, 'result' => object(Builder)))
at count(null)
in Builder.php (line 932)
at Builder->callScope(array(object(Reference), 'scopeForRegion'), array(object(Builder), object(Region)))
in Builder.php (line 1243)
at Builder->__call('forRegion', array(object(Region)))
in Model.php (line 1357)
at Model->__call('forRegion', array(object(Region)))
in Model.php (line 1369)
at Model::__callStatic('forRegion', array(object(Region)))
in ReferenceController.php (line 24)
at ReferenceController->index(object(Region), object(Type))
at call_user_func_array(array(object(ReferenceController), 'index'), array(object(Region), object(Type)))
in Controller.php (line 55)
at Controller->callAction('index', array(object(Region), object(Type)))
in ControllerDispatcher.php (line 44)

In Builder.php

protected function callScope(callable $scope, $parameters = [])
    {
        array_unshift($parameters, $this);

        $query = $this->getQuery();

        // We will keep track of how many wheres are on the query before running the
        // scope so that we can properly group the added scope constraints in the
        // query as their own isolated nested where statement and avoid issues.
        $originalWhereCount = is_null($query->wheres)
                    ? 0 : count($query->wheres);

        $result = $scope(...array_values($parameters)) ?? $this;

        if (count((array) $query->wheres) > $originalWhereCount) {
            $this->addNewWheresWithinGroup($query, $originalWhereCount);
        }

        return $result;
    }

Controller

public function index(Region $region = null, Type $type)
    {
        $references = Reference::forRegion($region)
            ->orderBy('name', 'asc')
            ->paginate(20);

        $regions = Region::orderBy('title', 'asc')->get();
        $types = Type::get();
        return view('reference.index', compact('references', 'regions', 'region', 'types'));
    }

Model

public function scopeForRegion($builder, $region)
    {
        if($region->id){
            return $builder->where('region_id', $region->id);
        }

        return $builder;

    }

TrentDPT started a new conversation Homestead Count() Countable Error • 2 months ago

Hey everyone,

I seem to have no issue when i run a server through xampp & use myphpadmin, but then when i switched the project over to homestead & used $faker to create the entire DB i get a count() error.

Wheb i use php tinker im able to see that all the proper data is input, but i still get this odd error. Its the equivalent setup to the Forums TDD series, and the threads. Where he uses the scope & builder.

9th November, 2017

TrentDPT left a reply on Laravel API Consumption In Ionic 2 • 3 months ago

Thank you so much for the fast response. Is there anyway i can discuss this further with you to get a better understanding on how to accomplish this?

TrentDPT started a new conversation Laravel API Consumption In Ionic 2 • 3 months ago

Hi everyone, I've been following along in the Forums TDD course, and have been using Laravel for a bit now, but still a newbie in the world of web design. I also have been playing around with the Ionic 2 framework in order to develop a possible mobile application.

My question is, how do I best create JSON data with an API from laravel, that I can then tap into with Ionic and display it? I might not be describing this correctly, and I feel I understand the concepts overall, but just havent seen the simplest way of doing this or a good step by step tutorial.

Any and all assistance would be fantastic

17th October, 2017

TrentDPT left a reply on Laravel As A Backend To An APP • 4 months ago

Hi @bashy,

For simplicity lets say I want to make an app that taps into the TDD Forum series by Jeffrey, and it needs all that functionality as well.

How should i go about learning and implimenting this?

TrentDPT started a new conversation Laravel As A Backend To An APP • 4 months ago

Morning All,

I keep hearing the concept of Laravel as a backend to an app, and using API calls or RESTful API calls. I understand the generalized concept that Laravel can be the PHP on the backend of an APP, and that the app (made with either Ionic or Phonegap) then just makes 'calls' to Laravel, but I have no idea how this is done or where to find information that will more easily explain this or walk me through it.

Does anyone know of any tutorials, or can they explain it? Or is it in one of Jeffery's videos, and I just dont know the title?

11th October, 2017

TrentDPT started a new conversation Laravel Backend - Phonegap Frontend Question • 4 months ago

Hi everyone,

So I get the idea that you use Laravel as a backend and create an API, and then that is sent to Phonegap. Then you use Phonegap/HTML/CSS/Jquery/Vuejs to render the data.

However....how the hell do I do that? haha. I would really appreciate if people list out the best resources to figure out how that works? Also, am I going to have to use Vue (or something like Angular) to render what blade would do for me typically for the webapp?

Please shoot me any educational walk throughs or demos that you might know of that could help me learn this.

29th August, 2017

TrentDPT started a new conversation Video Download Speeds • 5 months ago

Hi Jeff,

I've been a long time user, and i typically work offline, so I end up downloading most of the videos. For some reason around the time of video 64 of the TDD Forum series the download speed of the site tanked dramatically. The videos went from 5-8min download to 45-60mins, and they drop often requiring me to hit Resume quite frequently.

I just wanted to bring this to your attention since I have downloading content from other sites at the same pace since this new occurrence

19th July, 2017

TrentDPT left a reply on Laravel 5.4 & Webmail/C-panel • 7 months ago

another thread had the answer for me

TrentDPT left a reply on Laravel 5.4 & Webmail/C-panel • 7 months ago

Developments.

When i use mailtrap with my localhost site it works perfectly. But now when i try to use mailtrap with the cpanel hosted site it has a connection error.

This means that I have some sort of firewall or issue on the cpanel site?

TrentDPT left a reply on Laravel 5.4 & Webmail/C-panel • 7 months ago

So at this point in time if I use the Port:25 then i successfully connect to the c-panel webmail account, and therefore on the browser for my site it tells me that an email has been sent, but nothing ever comes through, and i'm not sure where to trouble shoot in order to find out why it isnt being sent....

TrentDPT left a reply on Laravel 5.4 & Webmail/C-panel • 7 months ago

I go to Mail Client Manual Settings in the C-panel Webmail section, and it has there

Username Password Incoming Server Outgoing Server

I then take the information listed there for Username, Password, and SMTP(outgoing server) & i've placed it in the .env file.

Then i get the above error that was in the original post. Please help

TrentDPT started a new conversation Laravel 5.4 & Webmail/C-panel • 7 months ago

Morning Everyone,

I'm just trying to setup the email so that I can do the simple things like reset password, but keep getting errors.

Swift_TrasportException
Connection to tcp:*****:465 Timed out

Could really use the help on this one. I'm not sure what to do at all

TrentDPT left a reply on Cannot Send Email Using The Given Webmail Configurations On CPanel • 7 months ago

@layer7 What is it that you ended up doing here? I'm in a similar situation just starting out with Webmail on C-panel, and trying to get it to work with Laravel 5.4

17th July, 2017

TrentDPT left a reply on AssertSee When Using Partials • 7 months ago

figured it out, was having a silly issue

TrentDPT started a new conversation AssertSee When Using Partials • 7 months ago

Hit everyone. So i'm trying to design my tests, and I have the following code.

        $this->signIn();

        $region = create('App\Region');

        $reference = create('App\Reference', ['region_id' => $region->id]);

        $this->get('/reference/' . $region->slug)
            ->assertSee($reference->name);

the issue I get is the following "Trying to get property of non-object (C:.....\reference\list.blade.php)

This is because I actually use a partial to display all of the information for the references. How due I then assertSee that content to make sure it is rendering on the page?

12th July, 2017

TrentDPT left a reply on Patch Request To Update User Profile • 7 months ago

Got it. Updated to this...

public function update(Request $request, $id)
    {
        $this->validate(request(), ['job' => 'required']);
        $user = User::where('id', $id)->update([
            'job' => request('job')
        ]);

        return back();
    }

and changed this in form

<form action="/profiles/edit/{{auth()->user()->id}}" method="POST">
        {{csrf_field()}}
        {{method_field('PATCH')}}

TrentDPT started a new conversation Patch Request To Update User Profile • 7 months ago

Having a difficult time understanding how to do a patch request for a user to update his own profile.

There is obviously more to it than this, and need some guidance

public function update(Request $request)
    {
        $user = auth()->user();
        $this->validate(request(), ['job' => 'required']);
        $user->update(request(['job']));

        return back();
    }

11th July, 2017

TrentDPT started a new conversation Chartjs Inside A Boostrap Tab...how To Unhide? • 7 months ago

So apparently what i've read online is that when you have a chartjs element inside a bootstrap tab, that it sets its size to almost nothing, and then when you click on that tab it doesnt appear. I've been trying to read solutions online, but have no idea of how to implement them. Any assistance would be very very very welcomed!

HTML


            <div class="nav-tabs-custom" id="work">
            <!-- Tabs within a box -->
            <ul class="nav nav-tabs pull-right">
              <li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>
              <li><a href="#sales-chart" data-toggle="tab">Donut</a></li>
              <li class="pull-left header"><i class="fa fa-inbox"></i> Sales</li>
            </ul>
            <div class="tab-content no-padding">
            
              <div class="chart tab-pane active" id="revenue-chart" style="position: relative; height: 300px;"></div>
              <div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;">
                <canvas id="psfsChart" height="60%"  width="100%"></canvas>
              </div>
            </div>
          </div>

js

$(function () {
var barChartCanvas = $("#psfsChart").get(0).getContext("2d");
    var barChart = new Chart(barChartCanvas);
    var barChartData = {
      labels: [["0-25", "Acute"], ["26-75", "Acute"], ["76-100", "Acute"]],
      datasets: [
        {
          label: "{{auth()->user()->name}}",
          fillColor: "rgba(26, 102, 244, 1)",
          strokeColor: "rgba(210, 214, 222, 1)",
          pointColor: "rgba(210, 214, 222, 1)",
          pointStrokeColor: "#c1c7d1",
          pointHighlightFill: "#fff",
          pointHighlightStroke: "rgba(220,220,220,1)",
          data: [
                {{$user->outcomeStats($region->id, 'psfs', 1)}},
                {{$user->outcomeStats($region->id, 'psfs', 2)}},
                {{$user->outcomeStats($region->id, 'psfs', 3)}}
                // 
          ]
        },
        {
          label: "Avg for Site",
          fillColor: "rgba(247,17,59,1)",
          strokeColor: "rgba(60,141,188,0.8)",
          pointColor: "#3b8bba",
          pointStrokeColor: "rgba(60,141,188,1)",
          pointHighlightFill: "#fff",
          pointHighlightStroke: "rgba(60,141,188,1)",
          data: [
            {{\App\Outcomes::allStat($region->id, 'psfs', 1)}},
            {{\App\Outcomes::allStat($region->id, 'psfs', 2)}},
            {{\App\Outcomes::allStat($region->id, 'psfs', 3)}},
            
          ]
        }
      ],
    };
    barChartData.datasets[1].fillColor = "#00a65a";
    barChartData.datasets[1].strokeColor = "#00a65a";
    barChartData.datasets[1].pointColor = "#00a65a";
    var barChartOptions = {
      //Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value
      scaleBeginAtZero: true,
      //Boolean - Whether grid lines are shown across the chart
      scaleShowGridLines: true,
      //String - Colour of the grid lines
      scaleGridLineColor: "rgba(0,0,0,.05)",
      //Number - Width of the grid lines
      scaleGridLineWidth: 1,
      //Boolean - Whether to show horizontal lines (except X axis)
      scaleShowHorizontalLines: true,
      //Boolean - Whether to show vertical lines (except Y axis)
      scaleShowVerticalLines: true,
      //Boolean - If there is a stroke on each bar
      barShowStroke: true,
      //Number - Pixel width of the bar stroke
      barStrokeWidth: 2,
      //Number - Spacing between each of the X value sets
      barValueSpacing: 5,
      //Number - Spacing between data sets within X values
      barDatasetSpacing: 1,
      //String - A legend template
      legendTemplate: "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].fillColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>",
      //Boolean - whether to make the chart responsive
      responsive: true,
      maintainAspectRatio: true,
      scaleOverride: true,
      scaleSteps:5,
      scaleStepWidth:20,
      scaleStartValue:0
    };

    barChartOptions.datasetFill = false;
    barChart.Bar(barChartData, barChartOptions);
});

10th July, 2017

TrentDPT left a reply on Using Hash/md5() Inside Vue? • 7 months ago

figured it out. just put the getGravatarAttribute from User.php into a

protected $appends = ['gravatar'];

then added this to my data in Reply.vue

gravatar: this.data.owner.gravatar

then in computed()

pic(){
    return this.gravatar;

TrentDPT left a reply on Grabbing Email Off Reply • 7 months ago

so i have a function on the user model that does this....

public function getGravatarAttribute()
    {
        $hash = md5($this->email);
        return "http://www.gravatar.com/avatar/$hash";
    }

and its what I use to grab the gravatar outside of a Vue Component. So how can I access either this attribute on the user...or how can I do a

md5(this.data.owner.email) 

in the Vue component to get it to work

TrentDPT started a new conversation Grabbing Email Off Reply • 7 months ago

So i am working through the lesson on Forum with TDD, and there is a portion where you create replies for threads. I want to add a gravatar picture to those replies, and have that in the Vue computed property section. However, I cant figure out how to grab the user's email via the reply in Vue.

data(){
            return {
                body: this.data.body,
                id: this.data.id,
                editing: false
            };
        },
        computed: {
            ago(){
                return moment(this.data.created_at + 'Z').fromNow() + '...';
            },
            signedIn(){
                return window.App.signedIn;
            },

            canUpdate(){
                return this.authorize(user => this.data.user_id == user.id);
                // return this.data.user_id == window.App.user.id;
            },
            pic(){
                return "http://www.gravatar.com/avatar/" + this.email;
            }

so in the pic() computed property i want "this.email" to be the email of the reply owner, so that it will have his/her gravatar next to his/her reply

9th July, 2017

TrentDPT left a reply on Database Migrations Set Limits • 7 months ago

crap, i was wrong, haha

integer|between:X, Y

still requires an integer, you cant leave it blank and allow it to be null :(

TrentDPT left a reply on Database Migrations Set Limits • 7 months ago

got it, figured it out

integer|between: X, Y

TrentDPT left a reply on Database Migrations Set Limits • 7 months ago

Thanks @spekkionu. Appreciate it. i think i'm going to go the validate way. But how can I put in the validation digits_between:X, Y without having a 'required' prior to it? Doesnt seem to be working.

I ask, because I want to leave the option for the user to not put an item in the form, but if they do then it has to be in a range

TrentDPT left a reply on Database Migrations Set Limits • 7 months ago

@bastman69 sorry, yes, @Cronix was correct that I was thinking in terms of setting a range.

So I want to set a range, but I still want it to accept Null as well if someone doesnt enter anything. So for that I can just use what you placed up there...

digits_between:0,10

but then just leave out 'required', correct?

TrentDPT started a new conversation Database Migrations Set Limits • 7 months ago

Morning Group,

if I'm expecting a number/integer to be placed in the database, in the migrations can I set the parameters for what number is acceptable? Meaning <10 , >0?

8th July, 2017

TrentDPT left a reply on Refactoring Help • 7 months ago

@martinbean correct. The field is medical, yes, so I know the variables are oddly named, but in essence i'm just grabbing specific information from a database, averaging it & neglecting the fields left blank, and then posting it on the site. At the same time i'm grabbing total averages so people can compare themselves to the sites mean for a specific type. Main thing for me at this point is what you helped me with in getting the averages was very helpful. but now I'm trying to figure out how to pass it through the Controller so that i'm dealing with a clean code, and one that has a low number of queries for the client side. Which means I'd probably want to figure out how to eager load it well?

7th July, 2017

TrentDPT left a reply on Refactoring Help • 7 months ago

@martinbean - in essence I would like the site to eventually be able to pull the user specific data, and the entire database data so that they can be compared individually against the mean. So i'm setting up methods on a CervicalStats class specifically to calculate that information.

TrentDPT left a reply on Refactoring Help • 7 months ago

excellent, Thanks. I think i like @martinbean 's approach. So now i'm trying to load that data in to the site, and am able to, but dont want to go down the too many Queries route, so trying to figure out best way to eagerload it.

$userStats = [
            CervicalStats::basicCervicalStats('ndi'),
            CervicalStats::basicCervicalStats('psfs'),
            CervicalStats::basicCervicalStats('pcs'),
            CervicalStats::basicCervicalStats('nprs'),
            CervicalStats::basicCervicalStats('days')
        ];

        $allUserStats = [

        ];

        return view('outcomes.index', compact('userStats', 'allUserStats'));

This is how it looks so far, with the website saying

{{$userStats[0]}}

for a specific piece of data. But I dont think this is the best way to do it. This is also without using those other methods you listed, which I think i'd rather do, but trying to figure out how to call it on the site best

TrentDPT started a new conversation Refactoring Help • 7 months ago

I have a lot of duplication in the top 2 methods, but I cant seem to figure out how to refactor down because of the fact that the 2 items I'd pull out are a string & a variable....

public function cervicalNdi()
   {
       return $this->findUserStat()
            ->filter(function($cervicalStat){
                return $cervicalStat->ndi >= 1;
            })
            ->pluck('ndi')
            ->avg();
   }

   public function cervicalPsfs()
   {
       return $this->findUserStat()
            ->filter(function($cervicalStat){
                return $cervicalStat->psfs >= 1;
            })
            ->pluck('psfs')
            ->avg();
   }

   public function findUserStat()
   {
       return CervicalStats::get()->filter(function($cervicalStat){
            return $cervicalStat->user_id == auth()->id();
       });
   }

6th July, 2017

TrentDPT left a reply on How To Query In A Laravel List • 7 months ago

Still unable to get it working thus far. I want to try that method instead of adding in another component. Anyone else could give this newb a bit more of a walk through?

TrentDPT left a reply on Passing Variable Into Page Request • 7 months ago

so i cant do something like... ?

return view('index.' . $something);

how would i set up that array?

TrentDPT started a new conversation Passing Variable Into Page Request • 7 months ago

Is it possible to do something along these lines ..

public function index(Something $something)
{

    return view ('index.($something)');
}

I want to be able to have multiple pages accessed via the same controller, but each page is unique in its own right, so I cant duplicate a lot of the information and have a typical page setup where you just pass a variable into a page using compact.

TrentDPT left a reply on Pass Null To Textarea • 7 months ago

duh, figured it out

TrentDPT started a new conversation Pass Null To Textarea • 7 months ago

Hi everyone,

I'm trying to let my form submit blank spaces to the database. I currently dont have 'required' inside of the input or textarea tags, and I am not validating the information in the store method. But I still get an error. Is this because my DB is not excepting a Null answer? and if so how do i set it so that it does?

TrentDPT left a reply on How To Query In A Laravel List • 7 months ago

So i seem to be running into an error when trying to pass down the information to the child component. I have the Controller sending the variable $references to what is my index.blade.php. That has been turned into an inline-template, and is working with showing the vue.component I wish to implement.

However

<reference-list :data="{{$resouces}}"></reference-list> 

does not seem to pass the information I need to then v-for down to the component. Advice?

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.