I am using `passport` in `laravel` for authenticating my users in APIs. I am able to authenticate different types of users from different tables and generating different token for them but the routes are not protected. For example. A user can access the routes like this Route::group(['middleware' => 'auth:api'], function () { Route::group(['prefix' => 'v1'], function () { Route::get('get-seller-list','API\v1\SellersController@index'); }); }); and A doctor can access the routes like Route::group(['middleware' => 'auth:sellers'], function () { Route::group(['prefix' => 'v1'], function () { Route::get('get-seller-detail','API\v1\TestController@getDetails'); }); }); but this `middleware` check doesn't seem to be working as I can access all the routes …

Member Avatar
Member Avatar
+0 forum 1

I am trying to implement multi authentication in `laravel5.2`. I am following [this article](http://saravanan.tomrain.com/multiauth-in-laravel-5-0/) My **Auth.php** <?php return [ 'multi' => array( 'user' => array( 'driver' => 'eloquent', 'model' => 'App\User', 'table' => 'users', ), 'admin' => array( 'driver' => 'database', 'model' => 'App\Admin', 'table' => 'tbl_admin_user', ) ), 'password' => [ 'email' => 'emails.password', 'table' => 'password_resets', 'expire' => 60, ], ]; My **App.php** 'providers' => [ /* * Laravel Framework Service Providers... */ //Illuminate\Auth\AuthServiceProvider::class, Ollieread\Multiauth\MultiauthServiceProvider::class, Illuminate\Broadcasting\BroadcastServiceProvider::class, Illuminate\Bus\BusServiceProvider::class, Illuminate\Cache\CacheServiceProvider::class, Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, Illuminate\Cookie\CookieServiceProvider::class, Illuminate\Database\DatabaseServiceProvider::class, Illuminate\Encryption\EncryptionServiceProvider::class, Illuminate\Filesystem\FilesystemServiceProvider::class, Illuminate\Foundation\Providers\FoundationServiceProvider::class, Illuminate\Hashing\HashServiceProvider::class, Illuminate\Mail\MailServiceProvider::class, Illuminate\Pagination\PaginationServiceProvider::class, Illuminate\Pipeline\PipelineServiceProvider::class, Illuminate\Queue\QueueServiceProvider::class, Illuminate\Redis\RedisServiceProvider::class, Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, Illuminate\Session\SessionServiceProvider::class, Illuminate\Translation\TranslationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, /* * Application …

Member Avatar
Member Avatar
+0 forum 1

I have a string like `string(8234) "<style>.{ margin-bottom:10px; float:left; display: inline-block; width:56%; text-align:left; padding-right:20px; padding-left:20px; } . > p { display: table-cell; height: 150px; vertical-align: middle; }..................</style>.................` I want to remove `<style>` tag and all its contents. I have tried $description = $product_info['description']; // the string with style tag $text = preg_replace('/<\s*style.+?<\s*\/\s*style.*?>/si', ' ', $description ); echo $text; but it shows the same string without removing `<style>` tag. I have also tried to replace only `<style>` tag by doing $text = str_replace("<style>", "", $description); but this also doesn't work at all. I am seeing the same string again and again. …

Member Avatar
Member Avatar
+0 forum 1

I have a div with `width: 200px` and I am adding text in it dynamically, I want the text to fit in this div but the text is getting out. I have tried to change the font size on character count but it does not work in all cases, like if string contains character with more width like **W** or **M**, the text goes out of the div. Below is my code if(cs >= 1 && cs <= 4) { if(this.engravingFontCaseSenstiveOptions(cText) == "Lower") { $('#overlay_image_text').css({'margin-top':'-162px'}); $('#overlay_image_text').css({'font-size':60+'px'}); }else if(this.engravingFontCaseSenstiveOptions(cText) == "Upper") { $('#overlay_image_text').css({'margin-top':'-154px'}); $('#overlay_image_text').css({'font-size':48+'px'}); $('#overlay_image_text').css({'margin-left':'0px'}); }else { $('#overlay_image_text').css({'margin-top':'-162px'}); $('#overlay_image_text').css({'font-size':60+'px'}); $('#overlay_image_text').css({'margin-left':'0px'}); } …

Member Avatar
Member Avatar
+0 forum 2

Hi all, I want to implement a page flip effect on y uploaded pdf file. like [Click Here](http://www.pressmo.com). I am uploading a pdf file and while viewing it, i want a page flip effect in it. Any help will be appriciated

Member Avatar
Member Avatar
+0 forum 2

**Problem** I need an jax pagination in YII, The problems are * its not showing the required results for the first time. ie. it is showing the complete result * When clicked on more, it again shows the complete result below that section as it is **What Needed** * i need to show, say 5 records for the first time * load the remaining results (5 rows) once clicked on more and so on **My Wordkout** **ControllerAction** public function actionShopStoresByCategory($storecategory, $affusername = NULL) { $this->ticker_news = NewsTicker::model()->getTickerNews(); if (!empty($affusername)) $this->VarifyUser($affusername); $this->layout = "layout_home"; $model = new Stores(); $criteria = new …

Member Avatar
+0 forum 0

I have a form for editing a user record. Its updates the record for the first time but when i press the update button again, it shows me an empty screen and it unsets the picture as well. I cannot figure out what I am doign wrong Below is my code public function actionEditProfile($affusername = NULL) { $this->layout = 'layout_home'; if ($this->VarifyUser($affusername) && Yii::app()->user->id) { $model = new Users('edit'); //apply rules if user comes directly to signup page // uncomment the following code to enable ajax-based validation if (isset($_POST['ajax']) && $_POST['ajax'] === 'editprofile-form') { CActiveForm::validate($model); Yii::app()->end(); } if (isset($_POST['Users'])) { …

Member Avatar
+0 forum 0

Hi all I am making a website. I want to use linkshare on my website so that all the publishers registered with linkshare are listed on my website. Any suggestions? [Link Share](http://www.linkshare.com/)

Member Avatar
Member Avatar
+0 forum 7

Hi Any one ever wrked on live helper chat? [This](http://livehelperchat.com/) This is following template structure may be symfony or smarty and I am looking to change some form labels, but cannot figure out where to chage? Thanks in advance for help

Member Avatar
Member Avatar
+0 forum 2

Hi all I have a website about magazines and I want to upload the pdf file into it and create a flipping book effect for that uploaded file. I have seen many softwares but he problem is * I want to integrate this functionality in my website * I am using custom Php, (I have seen module and components for Joomla and Magento) Thanks in advance

Member Avatar
Member Avatar
+0 forum 8

I have a search form with only one text field. The problem is that the width of that `text field` is not same. the style is form#index-table-form input[type="text"] { width: 106px; height: 24px; position: absolute; outline: none; right: 0; top: 6px; border: 1px solid #3772af; padding-left: 6px; padding-right: 24px; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; color: #0c4784; background: white; -moz-box-shadow: 0px 1px 2px 0px #737373; -webkit-box-shadow: 0px 1px 2px 0px #737373; box-shadow: 0px 1px 2px 0px #737373; behavior: url("js/PIE.htc"); } But the width and height is not the same on different pages. I cannot use the inline style …

Member Avatar
Member Avatar
+0 forum 4

I am very new to wordpress. I am hivaing a small problem in my site. I am using a custom template for the home page, I have category filters on top, on mouseover it shows the total no. of models in that specific category. Well the problem is, I have done the pagination as asked in my previous qiestion but this category wise filter does not work with pagination. For example you bring the mouse over "0-12 Boys", it will show you 3 but when you click on that, it will bring only 1 (other 2 are on the next …

Member Avatar
Member Avatar
+0 forum 1

Its been alot of mess to make the pagination in wordpress :( I have the pagination, but it renders the same page template file is ?php get_header(); ?> <?php global $my_query; global $paged; $paged = get_query_var('paged') ? get_query_var('paged') : 1; $temp = $my_query; $my_query = null; $args = array( 'post_type' => 'portfolio', 'paged' => $paged, 'posts_per_page' => 16, ); $my_query = new WP_Query( array( 'posts_per_page' => '-1', 'post_type' => 'portfolio' ) ); //do some work //calling paginate wp_paginate(); $wp_query = null; $wp_query = $temp; ?> paginate function is function paginate($args = false) { if ($this->type === 'comments' && !get_option('page_comments')) return; …

Member Avatar
Member Avatar
+0 forum 5

I have a search form, in which a user enters a keyword and it displays the results with the keyword in description as highlighted text, for highlighting, i have used another class on that keyword. problem is that, if there is a keyword in some hyperlink or in some <img> tag, it also applies that class there that causes the image load failure and links are not working. That is how i am fetching my results and highlighting them if there is any keyword. <?php if($_GET['key']){ $key = $_REQUEST['key']; $sql = "select * from tbl_feed WHERE title LIKE '%$key%' OR …

Member Avatar
Member Avatar
+0 forum 2

I have the following table structure of my db: * tbl_project * tbl_employee * tbl_deliverable * user_to_deliverable as tbl_prjct and tbl_deliverable has 1-many relation, tbl_employee and tbl_deliverable have many-many relation so they are splited into user_to_deliverable table All i want is that a query to show project_name(from tbl_project), project's deliverables (from tbl_deliverable) and emloyee name to which that specific deliverable is assigned to. Can i get help with this?

Member Avatar
Member Avatar
+0 forum 3

i am having a problem, i downloaded the project from dev to my local, though it is running fine on dev but on local, it says me the following error Fatal error: Class 'DB' not found in F:\xampp\htdocs\timesheet\index.php on line 9 my index.php is <?php session_start(); error_reporting(1); include_once('classes/db.php'); include_once('classes/functions.php'); //========================================== $dbFun=new DB(); $dbFun->ConnectToDb(); $incFun= new Functions(); //========================================== if(isset($_GET['file'])){ $file = $_GET['file']; } else if(isset($_POST['file'])){ $file = $_POST['file']; } else{ $file = "login.php"; } ?> <html><head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <title>::Administration::</title> <? if(($file != "login.php") && ($_SESSION['sid'] != "")){?> <link href="style.css" rel="stylesheet" type="text/css" /> <script src="js/CalendarPopup.js" type="text/javascript" language="JavaScript"></script> <script type="text/javascript" src="js/sortable.js"></script> …

Member Avatar
Member Avatar
+0 forum 2

i have an alert box which i want to show some icelandic text but its not showing it <script> function check() { alert("Þú verður að vera skráð/ur inn til þess að senda skilaboð"); } </script> it is showing the alert box but the text is messed up :( **Þú verður að vera skráð/ur inn til þess að senda skilaboð** any help please :(

Member Avatar
Member Avatar
+0 forum 3

I am running an application in which i am running an audio when it is clicked on image, while audio is being played and i changed the mode from landscape to portrait or from portrait to landscape and click on image, it plays another audio clip i.e. 2 audios are being played now. But this issue does not occur by clicking the images in the same mode. Is there any way to stop the previous activity when mode is changed?

Member Avatar
Member Avatar
+0 forum 3

Hi all, i am new to ubuntu. I am using fire ftp for downloading my project locally in ubuntu but when i click on download, it says "Failed to create directory locally". Is it some root permission issue? if yes, then how i can download my project?

Member Avatar
Member Avatar
+0 forum 1

i am new to android. While i am running my application, it is running well in landscape mode, but in portrait mode, application is forcefully closed giving the following in log 05-31 16:48:30.958: W/KeyCharacterMap(428): No keyboard for id 0 05-31 16:48:30.958: W/KeyCharacterMap(428): Using default keymap: /system/usr/keychars/qwerty.kcm.bin 05-31 16:50:45.728: D/AndroidRuntime(484): Shutting down VM 05-31 16:50:45.728: W/dalvikvm(484): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 05-31 16:50:45.758: E/AndroidRuntime(484): FATAL EXCEPTION: main 05-31 16:50:45.758: E/AndroidRuntime(484): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.kalmas/com.kalmas.Kalma2}: java.lang.NullPointerException 05-31 16:50:45.758: E/AndroidRuntime(484): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 05-31 16:50:45.758: E/AndroidRuntime(484): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 05-31 16:50:45.758: E/AndroidRuntime(484): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 05-31 16:50:45.758: E/AndroidRuntime(484): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 05-31 16:50:45.758: …

Member Avatar
Member Avatar
+0 forum 1

Hi all, How i can exit from an application? Button exit = (Button)findViewById(R.id.exit_btn); exit.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub finish(); java.lang.System.exit(0); } }); this code just takes me to the last activity but i want to completely close the application

Member Avatar
Member Avatar
+0 forum 1

Hi all, i am new to android development, in fact its my first application. i am making a simple calculator. i just want to know how to get the value of a pressed button. Any help plz

Member Avatar
Member Avatar
+0 forum 3

Hi all I was on break and just came back to Daniweb. I saw some great changes here like texteditor and user menu on top. I have some problems, admins please guide me firstly i am not having any email if someone replies to articles, i have posted in and secondly in controlpanel, i am not seeing my member badge Thanks and congrats for the new look again :)

Member Avatar
Member Avatar
+0 forum 4

Hi all i am working on a third party recruitment site in wordpress. Site basically acts as intermediary between candidate and employee. Is there any plugin to manage employees and employers in wordpress??

Member Avatar
+0 forum 0

i have following .htaccess RewriteEngine On DirectoryIndex index.php RewriteRule ^([a-zA-Z0-9_-]{3,20})/([^/]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3 [L] RewriteRule ^([a-zA-Z0-9_-]{3,20})/([^/]+)?$ index\.php?page=$1&s=$2 [L] RewriteRule ^([a-zA-Z0-9_-]{3,20})/?$ index\.php?page=$1 [L] RewriteRule ^([a-zA-Z0-9_-]{3,20})?$ index\.php?page=$1 [L] ErrorDocument 404 /404 it displays mu url as localhost/mysite/home for first perimeter and its going fine but when my url is localhost/mysite/home/user, whole look of page is disturbed i.e. no css and image is included here can any one please help me with this?

Member Avatar
Member Avatar
+0 forum 3

Hi all I am trying to show a comment box under each post, i have tried [code]<?php get_template_part( 'content', 'single' ); ?> <?php comments_template( '', true ); ?> [/code] but the comment box is still invisible

Member Avatar
Member Avatar
+0 forum 3

Hi all I am working on a website and the requirement is to make it in two languages i.e. icelandic and english. just like facebook and other google, if a user selects a language, then the site is translated in that language. I am not allowed to use google translator. Any other way to do this in Php Thanks in advance :)

Member Avatar
Member Avatar
+0 forum 3

Hi all I have following table structure [CODE] pk_cat_id(int) cat_name(varchar) cat_desc(text) fk_cat_id(int) [/CODE] table is self related as one to many i want to select cat_name, cat_desc and parent_cat_name() i.e. from fk_cat_id, how i can get cat_name

Member Avatar
Member Avatar
+0 forum 2

Hi all i am new to Node.js i followed the tutorial and typed the following [CODE]var sys = require("util"), http = require("http"); http.createServer(function(request, response) { response.sendHeader(200, {"Content-Type": "text/html"}); response.write("Hello World!"); response.close(); }).listen(8080); sys.puts("Server running at http://localhost:1331/");[/CODE] its running fine while i run it through cmd but when i open my browser and type the url i.e. [url]http://localhost:1331[/url], it says failed to open requested URL do i have to setup any web server for it??? or Node.js does it itself???

Member Avatar
Member Avatar
+0 forum 6

hi all i am new to java i want to run java php bridge as described [URL="http://php-java-bridge.sourceforge.net/doc/tomcat6.php"]here[/URL] now i am getting the following error [CODE]HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Could not connect to server php.java.servlet.fastcgi.FastCGIServlet.init(FastCGIServlet.java:133) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Unknown Source) root cause php.java.bridge.http.FCGIConnectException: Could not connect to server php.java.bridge.http.NPChannelFactory.test(NPChannelFactory.java:64) php.java.servlet.fastcgi.FastCGIServlet.init(FastCGIServlet.java:131) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Unknown Source) root cause java.io.IOException: File \\.\pipe\C:\Program Files\Apache Software Foundation\Tomcat 5.5\temp\JavaBridge614082128684791829.socket not writable php.java.bridge.http.FCGIConnectException.<init>(FCGIConnectException.java:37) php.java.bridge.http.NPChannelFactory.test(NPChannelFactory.java:64) php.java.servlet.fastcgi.FastCGIServlet.init(FastCGIServlet.java:131) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879) …

Member Avatar
Member Avatar
+0 forum 5

The End.