When I run command php artisan serve It start working with localhost:8000
How can start it as localhost.com
Please help and guide me.
via Chebli Mohamed
When I run command php artisan serve It start working with localhost:8000
How can start it as localhost.com
Please help and guide me.
Hello friends I am using users table column like (USERNAME,EMAIL,PASSWORD) if i am changing to column name as small letters is working fine. To Change column name as caps is not working give me any suggestion
This is my controller
public function postLogin(Request $request)
{
$this->validate($request, array('username' => 'required', 'password' => 'required'));
$credentials = $request->only('USERNAME', 'PASSWORD');
if (Auth::validate($credentials))
{
$user = Auth::getLastAttempted();
Auth::login($user, $request->has('remember'));
return redirect()->intended($this->redirectPath());
}
return redirect($this->loginPath())
->withInput($request->only('USERNAME', 'remember'))
->withErrors([
'username' => $this->getFailedLoginMessage(),
]);
}
I am trying to access a Shopping Cart view of a user, but when i click to get the Cart View it throws the below error.
Error : syntax error, unexpected 'item' (T_STRING)
Button:
<a href=""><i class="fa fa-shopping-cart" aria-hidden="true"></i> Shopping Cart
<span class="badge"></span>
</a>
Route:
Route::get('/shopping-cart','ProductController@getCart');
View:
@if(Session::has('cart))
<div class="row">
<div class="col-sm-6 col-md-6 col-md-offset-3 col-sm-offset-3">
<ul class="list-group">
@foreach($products as $product)
<li class="list-group-item">
<span class="badge"></span>
<strong></strong>
<span class="label label success"></span>
<div class="btn-group">
<button class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown">
Action <span class="carret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="$">Reduce By 1</a></li>
<li><a href="$">Reduce By All</a></li>
</ul>
</div>
</li>
@endforeach
</ul>
</div>
</div>
@endif
Cart Controller:
public function getCart(){
if(!Session::has('cart')){
return view('shop.shopping-cart');
}
$oldCart = Session::get('cart');
$cart = new Cart($oldCart);
return view('shop.shopping-cart', ['products' => $cart->items, 'totalPrice' => $cart->totalPrice]);
}
I am using Mailgun + Mail class in laravel 5.2 in this sample code:
Mail::send('emails.send', ['title' => $title, 'content' => $content], function ($message)
{
$message->from('hello@mywebsite.com', 'Marcos');
$message->to('amldesign@gmail.com');
});
I´m catch the $e Exceptions and laravel return me this error:
cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://ift.tt/1mgwZgQ)
I think that the services.php config is right:
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN','mywebsite.com'),
'secret' => env('MAILGUN_SECRET'),
],
What is the problem?
I have a existing laravel project that I have been working on for a while now.
I have to put it in a test environnement to show it to my employer. My problem is that I have no clue how to use my git repo of the project to put it on a fresh installation of wamp server.
1 - I have tried to install it as a whole but failed.
2- Then, I tried creating a fresh copy of Laravel base architecture (that worked) and after, replacing the files I modified on my existing project over on the fresh Laravel project. Turns out, it can not find my login.php page and I am stuck at that point.
So I want to find the easiest way to clone a git repo with an existing Laravel project directly on a wamp server and make it work.
I have been trying for several weeks, please help me.
Thanks
in there i want to add shopping cart in my project. i have try make it but its still want work.
this my controller :
function postCreate(){
echo '<pre>';
print_r(Request::all());
exit;
$data['list'] = DB::table('package')
->join("cms_car","cms_car.id","=","package.id_cms_car")
->join("zone","zone.id","=","package.id_zone")
->select("package.*","cms_car.car as name_car","cms_car.photo as car_photo");
return view('detail',$data);
}
and here my view for listing :
@if ($row->driver == 'Driver Included')
<img src="" style="max-width:15px;">
@else
@endif
</p>
<p>
@if ($row->driver == 'Driver Included')
<img src=""style="max-width:15px;">
@else
@endif
</p>
<h6 class="post-price">price :</h6>
<p>Rp. </p>
</div>
</div>
<hr>
<div class="col-md-6">
Unit Quality :<br><br>
<div class="input-group" style="width: 150px;">
<span class="input-group-btn">
<button type="button" class="btn btn-danger btn-number btn-minus" data-type="minus">
<span class="glyphicon glyphicon-minus"></span>
</button>
</span>
<input type="text" name="quantity" class="form-control input-number" value="1" data-price="" data-id="" min="1" max="100">
<span class="input-group-btn">
<button type="button" class="btn btn-success btn-number btn-plus" data-type="plus">
<span class="glyphicon glyphicon-plus"></span>
</button>
</span>
</div>
</div>
<div class="col-md-6">
<h3 style="margin-top:40px" id="price">Rp. </h3>
</div>
</div>
</div>
@endforeach
in there i want to make cart it only add when i change the unit quantity
form input name : quantity
have someone tell me what improvements do i have to make to the code to achieve my goal?
I have an issue with my project - when I changed the content of a blade template namely my home page the page doesn't get updated when I'm using localhost:8000 this is my master project in git. I have tried composer auto-dump then php artisan cache:clear but I getting the same result - what else could I do to correct this problem?