laravel-4

Routing issue with Laravel 4 and AngularJS in html5Mode

≡放荡痞女 提交于 2019-12-22 12:27:42
问题 I am creating a RESTful application with Laravel 4 as backend and AngularJS as frontend. I want to use routing from Angular. routes.php in laravel are set up like this (with one group /api, but it is not necessary) Route::any('{all}', function ($uri) { return View::make('index'); })->where('all', '.*'); My routes in Angular are $routeProvider. when('/', { templateUrl: 'views/test.html', controller: 'homeCtrl' }). when('/test', { templateUrl: 'views/test.html', controller: 'homeCtrl' }). when(

Laravel 5 __construct() argument passing error

风流意气都作罢 提交于 2019-12-22 12:27:09
问题 So I am trying to group all my validation rules into its respective files in folders for easy maintenance. Below is how my folder structures look: Project --app --config --(more folders) --domains ----App --------Entities --------Repositories --------Services --------Validators ----Core --------Validators So what I wanted to achieve is under Core\Validators I created a LaravelValidator.php which look like this <?php namespace Core\Validators; use Validator; abstract class LaravelValidator { /

Laravel Rest Authentication when post via HttpClient Android

与世无争的帅哥 提交于 2019-12-22 12:19:54
问题 How can I filter the laravel rest app, just authenticated userid and correct password when I post via android HttpClient? I try to find the best way, but get no best sample. This is my code: public static int LogExceptionError(final ExceptionLog exceptionLog) { final HttpResponse[] response = new HttpResponse[1]; new Thread(new Runnable() { public void run() { // Create a new HttpClient and Post Header HttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost

Laravel/Homestead - OSX - Vagrant Connection Timeout

心不动则不痛 提交于 2019-12-22 11:05:24
问题 Problem I am attempting to get Laravel Homestead working on my Mac Book Air. I have followed the instruction from http://laravel.com/docs/4.2/homestead but when I vagrant up I get stopped on: default: Warning: Connection timeout. Retrying... After I vagrant up fails because of connection timeout i can not vagrant provision or vagrant reload . I can however vagrant ssh into the machine and I can ping google from the machine. I can also spin up other vagrant boxes on my machine with no problem.

How do inject data into a layout?

元气小坏坏 提交于 2019-12-22 10:44:08
问题 I am trying to inject data into a layout (not the sub-view), but I have not found any method that seems practical. These are the two ways I currently know of to accomplish this. The data I will be injecting is the page title, for simplicity. Method 1 // app/controllers/HomeController.php protected $layout = 'main'; public function index() { $this->layout->title = 'Page Title'; $this->layout->content = View::make('home'); } // app/views/layout.blade.php ... <title>{{ $title }}</title> ...

SSL certificate error: self signed certificate in certificate chain in using Twilio on my Laravel Website

主宰稳场 提交于 2019-12-22 10:26:03
问题 I am testing my codes on my localhost and I tried dtisgodsson/laravel4-twilio to apply on my current website but I got this error SSL certificate problem: self signed certificate in certificate chain right after I put this code inside my index.blade.php: Twilio::to('119061539155')->message('This is so, damn, easy!'); What do I need to do to get rid of this error? 回答1: Twilio Developer Evangelist here. This error is caused by not having an up-to-date bundle of CA root certificates with your

Laravel 4: Cannot send email with inline embedding

时光怂恿深爱的人放手 提交于 2019-12-22 09:46:44
问题 Need help: how to send emails with inline image? The response returns 200 OK but email is not being sent. But when I removed $message->embed() everything is alright. I used {{ $message->embed('img/logo.png') }} in the view file, but the email is not sending, is it wrong location of image? (i have triedputting logo.png in public/img dir and app/views/emails/img dir, my email view file is in app/views/emails/mail.blade.php).Or is it something else? 回答1: for Embeding an image try this: <img

Htaccess redirect Laravel 4

拜拜、爱过 提交于 2019-12-22 09:04:29
问题 I have a Laravel 4 installation, and I used the boilerplate's htaccess to redirect my site from: site.com.br to www.site.com.br (notice the www ). But when I use a route such as site.com.br/TITLE-OF-MY-POST I am redirected to: www.site.com.br/index.php instead of www.site.com.br/TITLE-OF-MY-POST" Does anyone know why? Here my htaccess rules: Laravel's rule <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f

Laravel, using packages with PSR-4 gives message “No hint path defined for”

廉价感情. 提交于 2019-12-22 09:03:49
问题 Im using Laravel 4.1 and starting a package (subby) that is using PSR-4 standard. When I try to render any view with: return View::make('subby::user.login'); I get the message: No hint path defined for [subby] I've red many things, but those were usually typo problems 回答1: The problem is in the usage of the PSR-4 Since Laravel default is PSR-0 it assumes that the resources (views etc) of a package will be 2 levels up from where the package service provider is. Ex: src ├── config ├── lang ├──

Laravel, using packages with PSR-4 gives message “No hint path defined for”

三世轮回 提交于 2019-12-22 09:02:15
问题 Im using Laravel 4.1 and starting a package (subby) that is using PSR-4 standard. When I try to render any view with: return View::make('subby::user.login'); I get the message: No hint path defined for [subby] I've red many things, but those were usually typo problems 回答1: The problem is in the usage of the PSR-4 Since Laravel default is PSR-0 it assumes that the resources (views etc) of a package will be 2 levels up from where the package service provider is. Ex: src ├── config ├── lang ├──