douwu5428 2015-12-23 03:06
浏览 47

没有Eloquent和数据库迁移的Laravel?

I'm a PHP programmer for 12 years now, and pretty much re-invented the wheel many times, building my own framework for our closed-source web-app, which is offered as a hosted solution, using the same shared database for all customers.

Now I'm trying out Laravel 5 and noticed that almost every example uses Eloquent and database migrations. To me it seems these kind of things are targeted towards simple databases and people who don't like SQL or database-design (but I might be wrong).

Our MySQL database contains 100+ tables, a lot of stored procedures and many triggers which I just can't imagine doing in an ORM. We use Navicat for database-design and testing SQL-queries. For upgrading the database to a newer version of the app, we already wrote some nice scripts and even visual tools.

So basically my question is if Laravel is really intended to be used with Eloquent and migrations or that I'm really missing out a lot of functionality without them.

What do you recommend?

  • 写回答

3条回答 默认 最新

  • douyou7072 2015-12-23 03:29
    关注

    Its upto you,

    Laravel migration is aimed for keeping database version (while using version controller) also the eloquent is aimed for simple relation mapping between tables for complex situations like multiple Join and all its not recommended due to performance issue then you can choose Query Builder it gives much better performance , You need to write plain query in Laravel use \DB::statement();

    The Laravel is a perfect match for Angular Js, more Laravel is just a wrapper of few nice PHP components that is capable for providing rapid results.

    hope it helps..

    评论

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100