不使用composer将HTML包添加到Laravel

时间:2016-07-11 08:45:23

标签: php laravel-5.2

Laravel提供了各种内置标签,可以轻松安全地处理HTML表单。 HTML的所有主要元素都是使用Laravel生成的。所以我将采取这种设施,但它不起作用。

  

我使用作曲家需要laravelcollective / html

命令提示符说:

laravel>composer require laravelcollective/html
Using version ^5.2 for laravelcollective/html
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
  

包裹照明/ html被放弃,你应该避免使用它。使用   laravelcollective / html代替。

Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Generating optimized class loader

1 个答案:

答案 0 :(得分:6)

查找相对于项目根目录的- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"cell"; TVcell *cell = [tableViewdequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; if (cell == nil) cell = [[TVcellalloc]initWithStyle:UITableViewCellStyleDefaultreuseIdentifier:CellIdentifier]; cell.titleLabel.text = [[[arrayData objectAtIndex:indexPath.row]valueForKey:@"title"]stringByTrimmingCharactersInSet‌​:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; cell.txtlabel.text = [[[arrayData objectAtIndex:indexPath.row] valueForKey:@"description"]stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; cell.IMGLabel.contentMode = UIViewContentModeScaleAspectFill; [cell.IMGLabel sd_setImageWithURL:[NSURL URLWithString:[enclosureUrlArray objectAtIndex:indexPath.row]] placeholderImage:[UIImage imageNamed:@"placeholder"] options:indexPath.row == 0 ? SDWebImageRefreshCached : 0]; [cell.IMGLabel.layer setMasksToBounds:YES]; [cell.IMGLabel.layer setCornerRadius:2.5f]; [cell setNeedsLayout]; return cell; } vendor/illuminate/html文件夹。 在vendor/laravelcollective/htmlilluminate/html内查找laravelcollective/htmlcomposer.json字符串。

第一个是您定义的依赖项,seconde文件包含已安装的依赖项。

我猜你已经有了这个包,因为作曲家没有说要安装或更新。

如果composer.lock或vendor文件夹包含任何字符串/文件夹,那么您已经安装了它并可以在代码中使用它们。

<强>更新

通过将以下值添加到providers数组中,在composer.lock中注册服务提供者:

config/app.php

通过在别名数组中添加以下两行来注册外观:

Collective\Html\HtmlServiceProvider::class