Laravel blade pages are not loaded - laravel-5

I really need your help.
I have a project made with laravel 5.2 and it works fine in my computer but when I move it to another computer it does not show all blade pages except generic html
The question I have originally posted on Laracasts: My question link
The page being rendered is:
<div id="sf-resetcontent" class="sf-reset">
<h1>Whoops, looks like something went wrong.</h1>
<h2 class="block_exception clear_fix">
<span class="exception_counter">1/1</span>
<span class="exception_title"><abbr title="Symfony\Component\Debug\Exception\FatalErrorException">FatalErrorException</abbr> in <a title="D:\accounting\vendor\composer\ClassLoader.php line 347" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">ClassLoader.php line 347</a>:</span>
<span class="exception_message">Maximum function nesting level of '100' reached, aborting!</span>
</h2>
<div class="block">
<ol class="traces list_exception">
<li> in <a title="D:\accounting\vendor\composer\ClassLoader.php line 347" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">ClassLoader.php line 347</a></li>
<li>at <abbr title="Symfony\Component\Debug\Exception\FatalErrorException">FatalErrorException</abbr>->__construct() in <a title="D:\accounting\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php line 133" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">HandleExceptions.php line 133</a></li>
<li>at <abbr title="Illuminate\Foundation\Bootstrap\HandleExceptions">HandleExceptions</abbr>->fatalExceptionFromError() in <a title="D:\accounting\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php line 118" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">HandleExceptions.php line 118</a></li>
<li>at <abbr title="Illuminate\Foundation\Bootstrap\HandleExceptions">HandleExceptions</abbr>->handleShutdown() in <a title="D:\accounting\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php line 0" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">HandleExceptions.php line 0</a></li>
<li>at <abbr title="Composer\Autoload\ClassLoader">ClassLoader</abbr>->findFileWithExtension() in <a title="D:\accounting\vendor\composer\ClassLoader.php line 329" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">ClassLoader.php line 329</a></li>
<li>at <abbr title="Composer\Autoload\ClassLoader">ClassLoader</abbr>->findFile() in <a title="D:\accounting\vendor\composer\ClassLoader.php line 300" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">ClassLoader.php line 300</a></li>
<li>at <abbr title="Composer\Autoload\ClassLoader">ClassLoader</abbr>->loadClass() in <a title="D:\accounting\vendor\laravel\framework\src\Illuminate\Foundation\Application.php line 0" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Application.php line 0</a></li>
<li>at <abbr title=""></abbr>spl_autoload_call() in <a title="D:\accounting\vendor\laravel\framework\src\Illuminate\Foundation\Application.php line 648" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Application.php line 648</a></li>
<li>at <abbr title="Illuminate\Foundation\Application">Application</abbr>->registerDeferredProvider() in <a title="D:\accounting\vendor\laravel\framework\src\Illuminate\Foundation\Application.php line 628" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Application.php line 628</a></li>
<li>at <abbr title="Illuminate\Foundation\Application">Application</abbr>->loadDeferredProvider() in <a title="D:\accounting\v

As per the error being shown on the page, you are reaching a maximum function nesting level error; Maximum function nesting level of '100' reached.
To solve this you just need to increase the value of xdebug.max_nesting_level in your php.ini. You can increase this to whatever you want, 200 or 300 should do the trick.
Note, this is usually only an error when you are in local development due to using xdebug to help the debugging process as you build things.
More on the max nesting level below:
http://xdebug.org/docs/all_settings#max_nesting_level

Related

Match tag inside tag using bash

I have this html
<article class="article column large-12 small-12 article--nyheter">
<a class="article__link" href="/nyheter/14343208/">
<div class="article__content">
<h2 class="article__title t54 tm24">Person har falt ned bratt terreng - luftambulanse er på vei</h2>
</div>
</a>
</article>
<article class="article column large-6 small-6 article--nyheter">
<a class="article__link" href="/nyheter/14341466/">
<figure class="image image__responsive" style="padding-bottom:42.075%;">
<img class="image__img lazyload" itemprop="image" title="" alt="" src="data:image/gif;base64,R0lGODlhEAAJAIAAAP///wAAACH5BAEAAAAALAAAAAAQAAkAAAIKhI+py+0Po5yUFQA7" />
</figure>
<div class="article__content">
<h2 class="article__title t34 tm24">Vil styrke innsatsen mot vold i nære relasjoner</h2>
</div>
</a>
</article>
The thing is that I want to get only those html tags, in this case article tags, which has a child img tag inside them.
I have this sed command
sed -n '/<article class.*article--nyheter/,/<\/article>/p' onlyArticlesWithOutSpace.html > test.html
Now what I am trying ti achieve is to get only those article tags which has img tag inside them.
Output I want would be this
<article class="article column large-6 small-6 article--nyheter">
<a class="article__link" href="/nyheter/14341466/">
<figure class="image image__responsive" style="padding-bottom:42.075%;">
<img class="image__img lazyload" itemprop="image" title="" alt="" src="data:image/gif;base64,R0lGODlhEAAJAIAAAP///wAAACH5BAEAAAAALAAAAAAQAAkAAAIKhI+py+0Po5yUFQA7" />
I cannot use any xml/html parser. Just looking to use sed, grep, awk etc.
</figure>
<div class="article__content">
<h2 class="article__title t34 tm24">Vil styrke innsatsen mot vold i nære relasjoner</h2>
</div>
</a>
</article>
Care: parsing XML using sed is a wrong good idea!
Thanks to Cyrus's comment for pointing to good reference.
Anyway, U could try this:
sed -ne '/<article/{ :a; N; /<\/article/ ! ba ; /<img/p ; }'

XPath Select parent node based on child node

I need to extract the href where its descendant is: i/[#class="icon-right-open rotate180"]
I tried the following but it didn't work for me
//a[#class="arrowDot "]/#href /descendant::i[#class="icon-right-open rotate180"]
here is the HTML CODE:
<div class="paginationDots sMargTop centered">
<a href="https://www.mubawab.tn/fr/cc/immobilier-a-vendre-all:p:2:sc:apartments-for-sale,commercial-property-for-sale,farms-for-sale,houses-for-sale,land-for-sale,villas-and-luxury-homes-for-sale" class="arrowDot ">
<i class="icon-left-open rotate180"/>
</a>
<a href="https://www.mubawab.tn/fr/cc/immobilier-a-vendre-all:sc:apartments-for-sale,commercial-property-for-sale,farms-for-sale,houses-for-sale,land-for-sale,villas-and-luxury-homes-for-sale" class="Dots ">
1
</a>
<a href="https://www.mubawab.tn/fr/cc/immobilier-a-vendre-all:p:2:sc:apartments-for-sale,commercial-property-for-sale,farms-for-sale,houses-for-sale,land-for-sale,villas-and-luxury-homes-for-sale" class="Dots ">
2
</a>
<a class="Dots currentDot">
3
</a>
<a href="https://www.mubawab.tn/fr/cc/immobilier-a-vendre-all:p:4:sc:apartments-for-sale,commercial-property-for-sale,farms-for-sale,houses-for-sale,land-for-sale,villas-and-luxury-homes-for-sale" class="Dots ">
4
</a>
<a href="https://www.mubawab.tn/fr/cc/immobilier-a-vendre-all:p:5:sc:apartments-for-sale,commercial-property-for-sale,farms-for-sale,houses-for-sale,land-for-sale,villas-and-luxury-homes-for-sale" class="Dots ">
5
</a>
<a href="https://www.mubawab.tn/fr/cc/immobilier-a-vendre-all:p:6:sc:apartments-for-sale,commercial-property-for-sale,farms-for-sale,houses-for-sale,land-for-sale,villas-and-luxury-homes-for-sale" class="Dots ">
6
</a>
<a href="https://www.mubawab.tn/fr/cc/immobilier-a-vendre-all:p:7:sc:apartments-for-sale,commercial-property-for-sale,farms-for-sale,houses-for-sale,land-for-sale,villas-and-luxury-homes-for-sale" class="Dots ">
7
</a>
<a href="https://www.mubawab.tn/fr/cc/immobilier-a-vendre-all:p:4:sc:apartments-for-sale,commercial-property-for-sale,farms-for-sale,houses-for-sale,land-for-sale,villas-and-luxury-homes-for-sale" class="arrowDot ">
<i class="icon-right-open rotate180"/>
</a>
</div>
expected result is the following URL:
https://www.mubawab.tn/fr/cc/immobilier-a-vendre-all:p:4:sc:apartments-for-sale,commercial-property-for-sale,farms-for-sale,houses-for-sale,land-for-sale,villas-and-luxury-homes-for-sale
but actual output is empty
you almost got it correct. Here's the one you needed.
//a[#class="arrowDot "][descendant::i[#class="icon-right-open rotate180"]]/#href

print HtmlAnchor text inside <span> tags

I have the following HtmlAnchor
<a href="/property/tx/coldspring/77331/82-bradford-ln/167035284">
<span itemprop="streetAddress">SOMENUMBER Bradford Ln</span>,
<span itemprop="addressLocality">Coldspring</span>,
<span itemprop="addressRegion">TX</span>
<span itemprop="postalCode">77331</span>
</a>
When I print htmlAnchor.getTextContent() It's not printing the text inside the span tags. How can I get the whole text printed?

Laravel 5.2 Eloquent not working in godaddy server

I developed a website in local using Laravel 5.2. All functions are working perfectly. But when I have uploaded it in godaddy server, all functions are working except eloquent. Insert, Update, Delete all works. but in database engine it is showing MYISAM. I change it in INNODB. But still eloquent are not working. Is it the problem of foreign_key constrains?? Error is eloquent variables are not getting data. How to fix it??
Error:
<body>
<div id="sf-resetcontent" class="sf-reset">
<h1>Whoops, looks like something went wrong.</h1>
<h2 class="block_exception clear_fix">
<span class="exception_counter">1/1</span>
<span class="exception_title"><abbr title="Symfony\Component\Debug\Exception\FatalErrorException">FatalErrorException</abbr> in <a title="/home/abhaymilestogo/public_html/floorstyler/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php line 797" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Model.php line 797</a>:</span>
<span class="exception_message">Class '\App\Model\organization' not found</span>
</h2>
<div class="block">
<ol class="traces list_exception">
<li> in <a title="/home/abhaymilestogo/public_html/floorstyler/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php line 797" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Model.php line 797</a></li>
</ol>
</div>
</div>
</body>
agency.blade.php
<tr>
<th>{{$agency['id']}}</th>
<th>{{$agency['name']}}</th>
<th>{{$agency->organization->name}}</th>
<th>{{$agency['status']}}</th>
<th>{{$agency['updated_at']}}</th>
<th>{{$agency['created_at']}}</th>
<th>
<a style="font-size: medium;" class="fa fa-pencil-square-o" href="agency/edit/{{$agency['name']}}/{{Crypt::encrypt($agency['id'])}}"></a>
<a style="font-size: medium;" class="fa fa-trash-o" id="{{Crypt::encrypt($agency['id'])}}"></a>
#if($agency['status'] == 'ALIVE')
<a style="font-size: medium;" class="fa fa-times" id="{{Crypt::encrypt($agency['id'])}}"></a>
#else
<a style="font-size: medium;" class="fa fa-check" id="{{Crypt::encrypt($agency['id'])}}"></a>
#endif
</th>
</tr>
#endforeach
the problem is in {{$agency->organization->name}}
The error clearly states that Class \App\Model\organization not found.
Please check if you have defined the namespace in the Model class 'organization' and verify that the path you are specifying is correct.
Moreover, it is a good practice to always name your classes with the first letter capitalized.
If this does not solve the error, kindly post the file agency.blade.php.

Right positioning caret

Following html results bad positioned caret. how can I force it to be in the same line with link text?
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
link text <span class="caret"></span>
</a>

Resources