Search Posts

Category: lumen

What will be the best option for building a single page website [on hold]

I would like the expert advise on what to use in building a single page website. This is an NGO website that will allow visitors use a contact form to reach the NGO and also have a means of allowing people make donations online. I have experience working with Bootstrap, Laravel, Javascript and a bit of Angular. It will be an over kill building this with Laravel in my opinion, so I was wondering if […]

I trying to retrive image from mysql using lumen api and display in angular I.e. " Malformed UTF-8 characters, possibly incorrectly encoded "

Stored image in database as following: addslashes(file_get_contents(public_path() . ‘/Uploads/reward/’ . $rewardObj->id.’/’.$iterator->getFilename())); Lumen api response $membership = Reward::find($mid); $msg = $membership->file_name; return response()->json([‘status’ => ‘success’, ‘image’ => $msg],200, [‘Content-type’=> ‘image/png; charset=UTF-8′,’charset’ => ‘utf-8’],JSON_UNESCAPED_UNICODE); Mysql database column colum name : file_name type : longblob collection: blank Table collaction : latin1_swedish_ci Error on response: Malformed UTF-8 characters, possibly incorrectly encoded How can I display image in img tag? Image type is png Source: AngularJS

Lumen? Laravel? or somthing else? [on hold]

I’m planning on a website project with an API created with Lumen, this website will have fuctionnalities like logging with a facebook accounts (sessions then), some kind of a forum, image uploading with forms, and post rating. I need the API since i’m planning on crafting a mobile app in the near future. Right now i’m asking my self if i should use the Lumen templating system to create the frontend since the framework are […]

Restrict url from direct access from browser in lumen

I want to disallow user to access video from direct url using bowser <video src=”MYURL” type=”video/mp4″ ><track src=”http://www.videogular.com/assets/subs/pale-blue-dot.vtt” kind=”subtitles” srclang=”en” label=”English”></video> Above code is correct but if someone copy MYURL from inspect element in browser and try to access in new tab with direct MYURL i want to restrict them to do so. Technology Frontend : angularjs Backend : lumen (api) Source: AngularJS

Deny all but only allow access from Angularjs on the same server

I have a Lumen backend and an Angularjs project on the same server without a virtual host. The way I access APIs is simply by the URL like www.example.com/api/public/get_some_data. I want to hide these endpoints from the public but only allow access from the Angularjs. I tried adding this to the .htaccess in the api/public folder, Order deny,allow Deny from all Allow from 127.0.0.1 But Angular will be denied as well. I access the endpoint […]