i just wanted to run html source code but when i enter html source code to my text area and run it it displays only htmlcode as a string but i wanted to run that code...............................
View page
@extends('layouts.theme')
@section('content')
<div class="col-sm-8 col-sm-offset-2" style="border: 1px solid #ccc;">
<form class="form-horizontal login-form" method="post" name="loginFrm" id="loginFrm">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="form-group">
<label for="f" class="col-sm-3 control-label"></label>
<div class="col-sm-12">
<textarea name="txtinput" placeholder="Paste your html code here" class="col-sm-12" rows="20"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="submit" name="subBtn" class="btn btn-info pull-right">Format and Analyze</button>
</div>
</div>
</form>
</div>
<div style="clear:both"></div>
<div>
@if(count($htmlpagedata)>0)
{{ htmlentities($htmlpagedata) }}
@endif
</div>
@stop
Controller
<?php
namespace App\Http\Controllers;
use App\Http\Requests;
use Illuminate\Http\Request;
class JHtmlParsing extends Controller {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
return view('input');
}
/**
* Parse HTML Page.
*
* @return Response
*/
public function parsehtml(Request $request)
{
$data=$request->get('txtinput');
return view('input')->with('htmlpagedata',$data);
}
}
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1UasX5G
via IFTTT
Aucun commentaire:
Enregistrer un commentaire