How to add images in codeigniter using Bootstrap - image

I have started designing a website using codeigniter tutorial from tuts plus and encountered problem on how to add carousel images using Bootstrap in codeigniter. My images are found at /images/...
How can I solve this problem?
<div class="intro-block">
<div class="container">
<div class="row">
<div class="span3">
<div class=" t">
</div>
</div>
<div class="span9">
<div id="artcoursel" class="carousel slide">
<div class="carousel-inner">
<img src= "images/test-1.png" alt="">
</div>
</div>
</div>
</div>
</div>
</div>

Try this.
<img src=<?php echo base_url('images/test-1.png')?>>

Related

xpath: How to combine multiple conditions on different axes

I try to extract all links based on these three conditions:
Must be part of <div data-test="cond1">
Must have a <a href="..." class="cond2">
Must not have a <img src="..." class="cond3">
The result should be "/product/1234".
<div data-test="test1">
<div>
<div data-test="cond1">
Link 1
<div class="test4">
<div class="test5">
<div class="test6">
<div class="test7">
<div class="test8">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div data-test="test2">
<div>
<div data-test="cond1">
Link 2
<div class="test4">
<div class="test5">
<div class="test6">
<div class="test7">
<div class="test8">
<img src="bild.jpg" class="cond3">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
I'm able to extract the links with the following xpath query.
//div[starts-with(#data-test,"cond")]/a[starts-with(#class,"cond")]/#href
(I know the first part is not really neccessary. But better safe than sorry.)
But I'm still struggling with excluding the links containing an descendant img tag and how to add it to the query above.
This should do what you want:
//div[#data-test="cond1" and not(.//img[#class="cond3"])]
/a[#class="cond2"]
/#href
/product/1234

How can I display vue.js data in blade

I am doing a small project with vue.js and laravel. I have a list of products, when I click on a specific product on "Quick view" button I want to show all data about that product in a modal but the data is not showing in the modal.
Can you help me please. Here is my code:
#extends('app')
#section('content')
<div id ="crud" class="row">
<div class="col-xs-12">
<h1 class="page-header">Lista de Articulo</h1>
</div>
<div class="wrap-icon right-section col-md-12" data-toggle="modal" data-target="#list" >
<div class="wrap-icon-section wishlist">
<a href="#" class="link-direction">
<i class="fa fa-heart" aria-hidden="true"></i>
<div class="left-info">
<span class="index">0 item</span>
<br>
<span class="title">Wishlist</span>
</div>
</a>
</div>
</div>
<div class="row">
<div v-for="keep in keeps" class="col-md-4" style="width:25%;" #mouseover="showByIndex = keep" #mouseout="showByIndex = null">
<div class="container">
<img :src="keep.foto" style="width:100%; max-width:150px;">
<button class="btn" v-show="showByIndex === keep" v-on:click.prevent="showKeep(keep)">Quick view</button>
</div>
<h3>
<b> #{{keep.nombre}}</b>
</h3>
<p> #{{keep.descripcion}}</p>
I fixed it. The error was because I called the modal file outside the div. Thanks to everybody.
you can't send data directly from vue in blade structure, you need to write a component for that.
https://v3.vuejs.org/examples/modal.html#modal-component

Can't seem to get Col-4 Working on Laravel

So I am trying to create a car sales website using Laravel. The code presented shows 20 Cars from the database being shown but all one after the other. I want it to appear in columns of 3 or 4 if possible. I've been trying to use col-4 but it doesn't make any difference. Any help appreciated. The only answer I could find online was that the container was within the row but I don't have this issue so unsure.
<div class="container text-center">
<h2>Cars</h2>
<div class="row">
#foreach ($allcars as $car)
<div class="col-4">
<div class="card">
<img class="card-img-top" src="{{asset('qashqai.jpg')}}" alt="Card
image cap">
<div class="card-body">
<h4 class="card-title">{{$car->name}}</h4>
<p class="card-text">{{$car->description}}</p>
</div>
<div class="card-body">
Card link
Another link
</div>
</div>
</div>
#endforeach
</div>
</div>

How to get last child while parsing HTML with Goutte in Laravel

<div class="table">
<div class="table-head">
<div class="table-head-title">Ranking Equipos</div>
</div>
<div class="table-body">
<div class="table-body-row active">
<div class="col-key">Mark</div>
<div class="col-value">9233</div>
</div>
<div class="table-body-row">
<div class="col-key">Amanda</div>
<div class="col-value">7216</div>
</div>
<div class="table-body-row">
<div class="col-key">Mark</div>
<div class="col-value">6825</div>
</div>
<div class="table-body-row">
<div class="col-key">Paul</div>
<div class="col-value">6184</div>
</div>
<div class="table-body-row">
<div class="col-key">Amanda</div>
<div class="col-value">5866</div>
</div>
</div>
</div>
This is my HTML and I want to get last child of .table-body.
I tried to use JavaScript like logic and used indexing like this
$lastChild = $node->filter('.table-body .table-body-row')[4]; but it shows error. Cannot use object of type "Symfony\Component\DomCrawler\Crawler" as array
I was stuck in similar situation recently and I resolve this by using last() method. Syntax is here: $node->filter('.table-body .table-body-row')->last();

View [layouts.default] not found - Laravel

I am trying to run my laravel project but it showing error that view not found.
My welcome.blade.php file is
#extends('layouts.default')
#section('content')
<div class="slider">
<div class="img-responsive">
<ul class="bxslider">
<li><img src="images/slider/1.jpg" alt=""/></li>
<li><img src="images/slider/2.jpg" alt=""/></li>
<li><img src="images/slider/3.jpg" alt=""/></li>
</ul>
</div>
</div>
<div class="container">
<div class="text-center">
<div class="wow bounceInDown" data-wow-offset="0" data-wow-delay="0.3s">
<h3>Providing Our Clients</h3>
</div>
<div class="wow bounceInDown" data-wow-offset="0" data-wow-delay="0.6s">
<h2>Best & Creative Solutions</h2>
</div>
</div>
</div>
#endsection
Updated
you can see error here
file structure see here
Okay just looked at your folder structure, rename your layout folder to "layouts". hope that helps.

Resources