当前位置: 首页>>代码示例>>PHP>>正文


PHP URL::to_action方法代码示例

本文整理汇总了PHP中URL::to_action方法的典型用法代码示例。如果您正苦于以下问题:PHP URL::to_action方法的具体用法?PHP URL::to_action怎么用?PHP URL::to_action使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在URL的用法示例。


在下文中一共展示了URL::to_action方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: action_updateuserroles

 public function action_updateuserroles($user_id)
 {
     $user = User::find($user_id);
     $user->roles()->sync(Input::get('roles'));
     $url = URL::to_action('panel::site@editusers', array($user_id)) . '#roles';
     return Redirect::to($url)->with('role_success', '1');
 }
开发者ID:marmaray,项目名称:OLD-laravel-France-website,代码行数:7,代码来源:site.php

示例2: testToActionMethodGeneratesURLToControllerAction

 /**
  * Test the URL::to_action method.
  *
  * @group laravel
  */
 public function testToActionMethodGeneratesURLToControllerAction()
 {
     Route::get('foo/bar/(:any?)', 'foo@baz');
     $this->assertEquals('http://localhost/index.php/x/y', URL::to_action('x@y'));
     $this->assertEquals('http://localhost/index.php/x/y/Taylor', URL::to_action('x@y', array('Taylor')));
     $this->assertEquals('http://localhost/index.php/foo/bar', URL::to_action('foo@baz'));
     $this->assertEquals('http://localhost/index.php/foo/bar/Taylor', URL::to_action('foo@baz', array('Taylor')));
 }
开发者ID:gigikiri,项目名称:masjid-l3,代码行数:13,代码来源:url.test.php

示例3: action_index

 public function action_index($folder = null)
 {
     //if ( ! Request::ajax())
     //return;
     //Bundle::start('juploader');
     $uploader = IoC::resolve('Uploader');
     $uploader->with_uploader('Uploader\\DatabaseUploadHandler')->with_argument('1')->with_option('script_url', URL::to_action('juploader::dbupload@index'))->Start();
     return $uploader->get_response();
 }
开发者ID:ajayvaineela,项目名称:laravel-juploader,代码行数:9,代码来源:dbupload.php

示例4: link_icon

 public static function link_icon($action, $icon, $title = null, $parameters = array(), $attributes = array())
 {
     $url = URL::to_action($action, $parameters);
     if (is_null($title)) {
         $title = $url;
     }
     $icon_tag = '<i class="icon-' . $icon . '"></i>';
     return '<a href="' . $url . '"' . HTML::attributes($attributes) . ' title="' . $title . '">' . $icon_tag . '</a>';
 }
开发者ID:SerdarSanri,项目名称:gotin,代码行数:9,代码来源:gotinhelper.php

示例5: get_index

 public function get_index()
 {
     $view = View::make('appeal.index');
     $view->url = URL::to_action('appeal@new');
     $view->title = "Appeals Dashboard";
     return $view;
     // echo "Hello! Welcome to the user management page!";
     // $url = URL::to_action('appeal@new');
     // echo "\nIf you would like to submit a new parking ticket appeal, please go here: <a href='{$url}'>New Appeal</a>
 }
开发者ID:nkwsy,项目名称:ParkingAppeal,代码行数:10,代码来源:appeal.php

示例6: get_index

 public function get_index()
 {
     $openAppeals = Appeal::where('appealStatus', '=', '0')->count();
     $closedAppeals = Appeal::where('appealStatus', '=', '1')->count();
     $view = View::make('jboard.index');
     $view->url = URL::to_action('appeal@new');
     $view->openAppeals = $openAppeals;
     $view->closedAppeals = $closedAppeals;
     $view->title = "JBoard Dashboard";
     return $view;
 }
开发者ID:nkwsy,项目名称:ParkingAppeal,代码行数:11,代码来源:jboard.php

示例7:

@section('content')
<h2>Pay attention!!</h2>
<h3>This demo uses the DatabaseUploadHandler!</h3>
<h4>in order to play with this demo you MUST migrate the bundle</h4>
<pre>php artisan migrate juploader</pre>
</br>
<form id="dbfileupload" action="<?php 
echo URL::to_action('juploader::dbupload@index');
?>
" method="POST" enctype="multipart/form-data">
<?php 
echo Uploader\ButtonBar::create()->with_button(Uploader\Button::BUTTON_FILE, null, null, 'btn-inverse')->with_button(Uploader\Button::BUTTON_START, null, null, 'btn-inverse')->with_button(Uploader\Button::BUTTON_CANCEL, null, null, 'btn-inverse')->with_button(Uploader\Button::BUTTON_DELETE, null, null, 'btn-inverse')->with_button(Uploader\Button::BUTTON_SELECTALL, null, 'icon-check icon-white', 'btn-inverse');
?>
</form>

{{ Uploader\Templater::showAll() }}

<hr>
<h3>View's Code:</h3>
<pre class="prettyprint">
&lt;form id="fileupload" action="&lt;?php echo URL::to_action('juploader::dbupload@index'); ?>" method="POST" enctype="multipart/form-data">
&lt;?
$buttonFile = \Uploader\Button::fileButton()->with_label('Select File');
$buttonStart = new \Uploader\Button('Upload Now', "icon-upload icon-white", Uploader\Button::BUTTON_START, 'btn-success');
echo Uploader\ButtonBar::create()
		->with_button(Uploader\Button::BUTTON_FILE, null, null, 'btn-inverse')
		->with_button(Uploader\Button::BUTTON_START, null, null, 'btn-inverse')
		->with_button(Uploader\Button::BUTTON_CANCEL, null, null, 'btn-inverse')
		->with_button(Uploader\Button::BUTTON_DELETE, null, null, 'btn-inverse')
		->with_button(Uploader\Button::BUTTON_SELECTALL, null, 'icon-check icon-white', 'btn-inverse');
?>
开发者ID:ajayvaineela,项目名称:laravel-juploader,代码行数:31,代码来源:demo4.blade.php

示例8: TEXT2IMG

/**
* Extract image from text
*
* @param  string
* @return string
*/
function TEXT2IMG($text, $w = 320, $h = 200, $key = 0)
{
    $tmp_text = trim($text);
    $tmp_text = Marker::decode($tmp_text);
    preg_match_all('/src="([^"]*)"/i', $tmp_text, $matches);
    if (!empty($matches[1])) {
        $file = PATH2FILE($matches[1][$key]);
        $thumbs = Config::get('cms::theme.thumb');
        foreach ($thumbs as $val) {
            $file = str_replace($val['suffix'], '', $file);
        }
        $url = URL::to_action('cms::image@thumb', array($w, $h, $file));
        return HTML::image($url, '', array('width' => $w, 'height' => $h));
    } else {
        $thumbs = Config::get('cms::theme.thumb');
        $url = URL::to_action('cms::image@thumb', array($w, $h, 'img_default.jpg'));
        return HTML::image($url, '', array('width' => $w, 'height' => $h));
    }
}
开发者ID:BGCX262,项目名称:zweer-laravel-svn-to-git,代码行数:25,代码来源:helpers.php

示例9: render

<?php

echo render('partial.head');
?>
<h3 class="titlePart">Chansons</h3>
<a class="linkAdd" href="<?php 
echo URL::to_action('song/add');
?>
" ><button class="buttonAdd"> Ajouter une nouvelle chanson </button></a>

<table class="toSeek_result" id="tableContent">
    <tr id="lineTitle">
        <th class="toSeek_title">
            Titre 
        </th>
        <th class="toSeek_band">
            Artiste 
        </th>
        <th class="toSeek_album">
            Album
        </th>
        <th class="toSeek_length">
            Durée
        </th>
        <th class="toSeek_add">
            Ajouter
        </th>
        <th class="toSeek_msg">
            
        </th>
        
开发者ID:laiello,项目名称:atm-music,代码行数:30,代码来源:index.php

示例10:

">Chansons</a></li>
                                    <li><a href="<?php 
    echo URL::to_action('upload');
    ?>
">Importer</a></li>
                                </ul>
                                <div class="clear"></div>
                            </li>
                            <li> <a href="#"><?php 
    echo $user->get_username_user_lif();
    ?>
 </a> 
                                <ul>
                                    <li><a href="">Mon profil</a></li>
                                    <li><a href="<?php 
    echo URL::to_action('login@logout');
    ?>
">Se déconnecter</a></li>
                                </ul>
                        </ul>



                    </h3>


<?php 
}
?>

开发者ID:laiello,项目名称:atm-music,代码行数:29,代码来源:head.php

示例11: get_logout

 public function get_logout()
 {
     Auth::logout();
     return Redirect::to(URL::to_action('dojo::home@index'));
 }
开发者ID:SerdarSanri,项目名称:Dojo,代码行数:5,代码来源:login.php

示例12: link_to_action

 /**
  * Generate an HTML link to a controller action.
  *
  * An array of parameters may be specified to fill in URI segment wildcards.
  *
  * <code>
  *		// Generate a link to the "home@index" action
  *		echo HTML::link_to_action('home@index', 'Home');
  *
  *		// Generate a link to the "user@profile" route and add some parameters
  *		echo HTML::link_to_action('user@profile', 'Profile', array('taylor'));
  * </code>
  *
  * @param  string  $action
  * @param  string  $title
  * @param  array   $parameters
  * @param  array   $attributes
  * @return string
  */
 public static function link_to_action($action, $title = null, $parameters = array(), $attributes = array())
 {
     return static::link(URL::to_action($action, $parameters), $title, $attributes);
 }
开发者ID:gilyaev,项目名称:framework-bench,代码行数:23,代码来源:html.php

示例13:

echo HTML::script("http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js");
?>
	<?php 
echo HTML::script("js/master.js");
?>

	<!--[if lte IE 8]>
		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
</head>

<body>
	<div id="container">
		<div id="info">
			<p>by <a href="http://ashic.us">ash white</a></p>
			<p>data from <a href="http://en.wikipedia.org/wiki/List_of_dates_predicted_for_apocalyptic_events">wikipedia</a></p>

			<div id="social">
				<div id="twitter">
					<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://thegoddamnapocalypse.com" data-text="<?php 
echo Services\Twitter::tweetText($past_apocalypses);
?>
" data-dnt="true">Tweet</a>
				</div>
			</div>
		</div>

		<h1><a href="<?php 
echo URL::to_action("/");
?>
">THE GODDAMN APOCALYPSE</a></h1>
开发者ID:ashicus,项目名称:apocalypse,代码行数:31,代码来源:header.blade.php

示例14: generatePermalink

 public function generatePermalink()
 {
     return \URL::to_action('blog::home@resolve', array($this->get_attribute('id')));
 }
开发者ID:marmaray,项目名称:OLD-laravel-France-website,代码行数:4,代码来源:post.php

示例15: array

Route::post('/(:bundle)/articles/edit/update', array('as' => 'dojo::updated_article', 'uses' => 'Dojo::article@edit'));
Route::put('/(:bundle)/articles/quick_edit/update', array('as' => 'dojo::update_mass', 'uses' => 'Dojo::article@update'));
Route::any('/(:bundle)/articles/delete/(:any)', array('as' => 'dojo::delete_article', 'uses' => 'Dojo::article@erase'));
Route::any('/(:bundle)/articles/new', array('as' => 'dojo::new_article', 'uses' => 'Dojo::article@new'));
Route::any('/(:bundle)/articles/(:any?)/(:any?)/(:any?)', array('as' => 'dojo::index_article', 'uses' => 'Dojo::article@index'));
Route::post('/(:bundle)/articles/search', array('uses' => 'Dojo::article@search'));
Route::get('/(:bundle)/articles/results/(:all)', array('as' => 'dojo::results_article', 'uses' => 'Dojo::article@results'));
//projects routes
Route::any('/(:bundle)/projects/new/redactor', array('as' => 'dojo::new_image_project', 'uses' => 'Dojo::project@redactorupload'));
Route::get('/(:bundle)/projects/edit/(:any)', array('as' => 'dojo::edit_project', 'uses' => 'Dojo::project@edit'));
Route::post('/(:bundle)/projects/edit/update', array('as' => 'dojo::update_project', 'uses' => 'Dojo::project@edit'));
Route::any('/(:bundle)/projects/delete/(:any)', array('as' => 'dojo::delete_project', 'uses' => 'Dojo::project@erase'));
Route::any('/(:bundle)/projects/new', array('as' => 'dojo::new_project', 'uses' => 'Dojo::project@new'));
Route::any('/(:bundle)/projects/(:any?)/(:any?)/(:any?)', array('as' => 'dojo::index_project', 'uses' => 'Dojo::project@index'));
Route::post('/(:bundle)/projects/search', array('uses' => 'Dojo::project@search'));
Route::get('/(:bundle)/projects/results/(:all)', array('as' => 'dojo::results_project', 'uses' => 'Dojo::project@results'));
Route::put('/(:bundle)/projects/edit/update', array('as' => 'dojo::update_project', 'uses' => 'Dojo::project@update'));
//settings
Route::any('/(:bundle)/settings', array('uses' => 'Dojo::setting@index'));
Route::any('/(:bundle)/settings/social', array('uses' => 'Dojo::setting@social'));
Route::controller(Controller::detect('dojo'));
Route::filter('auth', function () {
    if (Auth::guest()) {
        return Redirect::to(URL::to_action('dojo::login'));
    }
});
Route::filter('csrf', function () {
    if (Request::forged()) {
        return Response::error('500');
    }
});
开发者ID:SerdarSanri,项目名称:Dojo,代码行数:31,代码来源:routes.php


注:本文中的URL::to_action方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。